A boilerplate for Node.js backend built with Express, Waterline, Bull, GraphQL, ...
- MongoDB v4
- Redis v4
- modular setup with some convention over configuration
*.model.js
for data models*.seed.js
for data seed*.job.js
for Bull' job definition*.api.js
for express' routing
- manages data with Waterline
- auto-exposes Waterline schema as GraphQL
- enables temporary (backed by Redis) and permanent (backed by MongoDB) data key-value storage
- enables one-time and repetitive/cron jobs and managed by Bull
- ...
# install dependencies
npm install
# format code
npm run format
# lint code
npm run lint
# generate docs (jsdoc, apib, postman) in `generated` folder
npm run docs
# clear database
npm run data:clear
# seed database
npm run data:seed
# run all application components (core, api worker, and job runner)
npm run dev
## OR
# run application core
npm run dev:core
# run application api worker
npm run dev:api
# run application job runner
npm run dev:job
# run application console
npm run dev:console
# run all tests
npm run test
# run unit tests
npm run test:unit
# run integration tests
npm run test:spec
# run unit tests for specific module
npm run test -- '/post/*.test.js'
# run integration tests for specific module
npm run test -- '/post/*.spec.js'
# run specific test
npm run test -- src/module/post/post.test.js