Using a library called Bull for prioritizing processes, monitoring events, number of simultaneous processes, in addition to working in separate threads in the application.
First of all, you may clone this repo
git clone https://github.com/leandrocanabarro/background-jobs-in-nodejs-with-redis.git
Run the following scripts in order to execute the application in development mode
// Install the dependencies
npm install
// Start the application
npm start:server
// Start the job queue
npm start:queue
Feel free to send me feedback on LinkedIn or file an issue. Feature requests are always welcome.