Built this so I always have a starting point for a rest api utilizing async/await
and es6+
features. Feel free to use it as it is or modify it according to your needs.
- Koa
- koa-trie-router - Router for Koa
- koa-mount - to mount multiple koa-trie-router
- koa-body - Body Parser Middleware
- koa-compose - Compose Middleware
- koa-morgan - HTTP request logger middleware for koa.
- koa-passport - Passport wrapper for koa
- passport-local - Username/Email and Password strategy for passport
- passwport-jwt - JWTStrategy for passport
- Mongoose - MongoDB ODM
- Boom - For errors
- bcryptjs - bcrypt in plain javascript
- dotenv - loads environment variables from .env
- validate.js - validator for javascript objects
- ESlint - Linting library chose Airbnb-Base
- Prettier - Prettier
Self explanatory
controllers
- place for controllers used by routes heremiddlewares
- place for middlewaresmodels
- place formongoose
modelsroutes
- placekoa-trie-router
routesserver.js
- set up serverindex.js
- entry point.env
- Environment Variables.eslintrc.json
- eslint config
- Replaced Camo.js with Mongoose
- Replaced koa-66 with koa-trie-router
- Added Passport.js
- Updated several packages
- Added Prettier