Created
August 25, 2021 12:16
-
-
Save andris9/d3556b0636be6bcdafcd4836ee734278 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install bull bull-arena express | |
// node bull-ui.js | |
// open http://localhost:6789 | |
const Arena = require("bull-arena"); | |
const Bull = require("bull"); | |
const express = require("express"); | |
const app = express(); | |
const router = express.Router(); | |
const REDIS_CONF = { | |
url: "redis://127.0.0.1:6379/8", | |
}; | |
const arena = Arena( | |
{ | |
Bull, | |
queues: [ | |
{ | |
name: "submit", | |
hostId: "EmailEngine", | |
redis: REDIS_CONF, | |
}, | |
{ | |
name: "notify", | |
hostId: "EmailEngine", | |
redis: REDIS_CONF, | |
}, | |
], | |
}, | |
{ | |
basePath: "/", | |
disableListen: true, | |
} | |
); | |
router.use("/", arena); | |
app.use(router); | |
app.listen(6789, () => console.log("App listening")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment