Working with queues on Node JS.
First of all, duplicate the file env.example.js
and rename it to env.js
. Next, add your own information.
npm run dev
PORT=<PORT-NUMBER> npm run dev
Then access http://localhost:3000
on your browser.
npm start
PORT=<PORT-NUMBER> npm start
API endpoint: /api/v1
To execute this API's methods, check the following routes:
-
Create job:
-
Route:
POST /queue
-
Body:
{ "title" : "Hello World", "to" : "[email protected]" }
-
-
Retrieve failed jobs:
- Route:
GET /failed
- Responses:
-
200:
{ "err": null, "jobs": [ 131, 132 ], "total": 2 }
-
- Route:
-
Retrieve active jobs:
- Route:
GET /active
- Responses:
-
200:
{ "err": null, "jobs": [ 131, 132 ], "total": 2 }
-
- Route: