A boilerpalte for building Bull job-queue worker based on Redis
- ES6/ES2015 support using Babel
- Use Bull job manager for persistent job and message queue based on Redis
- Use Toureiro to provide web interface for administration of the queues
- Use nodemon for watching and restarting in development environment
- Use Jest as test framework
.
├── bin
│ └── worker.js # entry of worker
├── src
│ ├── config # app configurations
│ │ ├── env # environment variable definitions
│ │ ├── config.js # configuration variables
│ │ └── index.js # entry of configuration
│ │── jobs # job queue and process implementations
│ └── app.js # application entry
├── test # testing scripts
└── package.json
Bull requires a Redis version greater than or equal to 2.8.11
.
$ npm install
Create a job file in folder src/jobs
.
$ npm run dev -- -j [JOB_FILE_NAME]
Run a job.
$ npm start -- -- -j [JOB]
Run multiple jobs.
$ npm start -- -- -j [JOB1,JOB2,...]
Run Toureiro for monitoring jobs.
$ npm start -- -- -u -p [port]
$ npm test
MIT © Chun-Kai Wang