This is the second incarnation of the P2P VPS server. Whereas the first repository focused on proof-of-concept, this second version focuses on Test Driven Development (TDD). Every API is fully tested as it is developed. This makes the software much more reliable and makes the open source project much more manageable.
This new version of the server was based on this Koa Boilerplate project.
git clone https://github.com/P2PVPS/p2pvps-server2
npm install
./install-mongo
npm run test
npm start├── bin
│ └── server.js # Bootstrapping and entry point
├── config # Server configuration settings
│ ├── env # Environment specific config
│ │ ├── common.js
│ │ ├── development.js
│ │ ├── production.js
│ │ └── test.js
│ ├── index.js # Config entrypoint - exports config according to envionrment and commons
│ └── passport.js # Passportjs config of strategies
├── src # Source code
│ ├── modules
│ │ ├── controller.js # Module-specific controllers
│ │ └── router.js # Router definitions for module
│ ├── models # Mongoose models
│ └── middleware # Custom middleware
│ └── validators # Validation middleware
└── test # Unit tests
npm startStart server on live modenpm run devStart server on dev mode with nodemonnpm run docsGenerate API documentationnpm testRun mocha tests
API documentation is written inline and generated by apidoc.
Visit http://localhost:5000/docs/ to view docs
MIT