A API boilerplate built on top of ExpressJS.
- Database: NoSQL with MongoDB/Mongoose;
- Authentication: Authenticate users with JWT;
- Logs: Logging info with Winston/Morgan;
- Tests: Unit/Integration Tests running with Jest;
- Error handling: Centralized error handling middleware;
- Security:
- Code Analisys: Codecov/Codacy;
- Linting: ESLint/Prettier;
- API Documentation: Swagger/Postman;
Clone the repository
$ git clone https://github.com/lucas-a-pelegrino/node-bloodboiler
$ cd node-bloodboiler
Install the dependencies
$ npm install
# or
$ yarn install
Setup environment variables (modify/add more variables if needed)
$ cp .env.example .env
Start application
# locally:
$ npm run start:dev
$ yarn start:dev
# staging:
$ npm run start:staging
$ yarn start:staging
# production
$ npm start
$ yarn start
Testing
# Run tests
$ npm test
$ yarn test
You might want to check the API docs as well!
- Collection on Postman;
- Swagger: Just start the application at your desired
host:port
and use the route:/api/v1/documentation
to open the swagger docs;