Nodejs boilerplate with express,Mongoose,Mysql,JWT,ES6,ES7,ES8 support to develop REST api
- ES6,ES7,ES8 supported via babel 7.*
- Authentication via JWT with dynamic secret per user
- Jwt middleware for authenticated routes management
- Request validation using joi
- async-await with single try catch throughout routes using asyncWrapper
- Code linting using standard and pre commit git hooks using husky
- Integration test using mocha,chai,chai-http
- Auto server start using nodemon
- uses yarn over npm
- Application level errorHandler
- Manage enviroment via dotenv
- Code coverage with istanbul
- uses helmet to secure api endpoints which adds necessary security headers
- Added support for databases like mysql and mongoDB with async await
- Flexible fileupload with disk and S3 storage using multer and multer-s3
- Clone repository
> git clone https://github.com/vibhasfl/express-mongoose-es8-rest-api.git
> cd express-mongoose-es8-rest-api
- Install yarn
> npm i -g yarn
- Install project dependencies
> yarn
- Set enviroment variables
> cp .env.sample .env
- Run application
> yarn dev OR npm run dev
- Run tests
> yarn test
- Generate coverage report
> yarn test:coverage
Note : Open coverage/lcov-report/index.html
> yarn build
> docker-compose build
> docker-compose up
Note : Make sure docker is being installed first