Skip to content

Instantly share code, notes, and snippets.

@andris9
Created August 25, 2021 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andris9/d3556b0636be6bcdafcd4836ee734278 to your computer and use it in GitHub Desktop.
Save andris9/d3556b0636be6bcdafcd4836ee734278 to your computer and use it in GitHub Desktop.
// 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