2016-02-17 19:27:37 -05:00
2016-02-15 18:22:52 -05:00
2016-02-11 15:10:57 -05:00
2016-02-11 14:28:00 -05:00
2016-02-11 16:15:28 -05:00
2016-02-11 14:27:15 -05:00
2016-02-11 15:10:57 -05:00
2016-02-11 14:27:15 -05:00
2016-02-17 19:27:53 -05:00
2016-02-17 19:15:43 -05:00

#koa2-api-boilerplate Boilerplate for building APIs with koa2 and mongodb.

This project covers basic necessities of most APIs.

  • Authentication (passport & jwt)
  • Database (mongoose)
  • Testing (mocha)

##Requirements

  • node ^4.0.0
  • npm ^3.0.0

##Installation

git clone https://github.com/adrianObel/koa2-api-boilerplate.git

##Features

##Structure

├── config                   # Server configuration settings
│   ├── server.js            # Bootstrapping and entry point
│   ├── config.js            # JSON dictionary for environment specific config
│   └── passport.js          # Passportjs config of strategies
├── src                      # Source code
│   ├── controllers          # Routes
│   ├── models               # Mongoose models
│   └── middleware           # Custom middleware
│       └── validators       # Validation middleware
└── test                     # Unit tests

##Usage

  • npm start Start server on live mode
  • npm run dev Start server on dev mode with nodemon
  • npm test Run mocha tests

##License MIT

Languages
JavaScript 97.6%
Dockerfile 1.2%
Shell 0.7%
HTML 0.5%