- Notifications
You must be signed in to change notification settings - Fork51
Boilerplate for building APIs with koa2.
License
NotificationsYou must be signed in to change notification settings
adrianObel/koa2-api-boilerplate
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Boilerplate for building APIs withkoa2 and mongodb.
This project covers basic necessities of most APIs.
- Authentication (passport & jwt)
- Database (mongoose)
- Testing (mocha)
- Doc generation with apidoc
- linting using standard
##Requirements
- node^4.0.0
- npm^3.0.0
##Installation
git clone https://github.com/adrianObel/koa2-api-boilerplate.git
##Features
- koa2
- koa-router
- koa-bodyparser
- koa-generic-session
- koa-logger
- MongoDB
- Mongoose
- Passport
- Nodemon
- Mocha
- apidoc
- Babel
- ESLint
##Structure
├── 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##Usage
npm startStart server on live modenpm run devStart server on dev mode with nodemonnpm run docsGenerate API documentationnpm testRun mocha tests
##DocumentationAPI documentation is written inline and generated byapidoc.
Visithttp://localhost:5000/docs/ to view docs
##LicenseMIT
About
Boilerplate for building APIs with koa2.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.