BullMQ is a powerful queue system for handling jobs in Node.js, and installing it into your project is straightforward using npm or yarn.
Firstly, you need to make sure that Redis is installed on your machine as BullMQ depends on it. Redis can be installed following the instructions on their official website: https://redis.io/topics/quickstart
After ensuring the availability of Redis, you can install BullMQ by running the following command in your terminal:
If you're using npm:
Or if you're using yarn:
This will add BullMQ to your
node_modules directory, and it can then be imported and used within your project like so:
Please note that you should have a redis instance running before you try to create a new Queue.