Created
February 25, 2021 13:44
-
-
Save ctrlaltdylan/014465155163a7301335c0eea089dfc0 to your computer and use it in GitHub Desktop.
Bullboard with Next JS
This file contains hidden or 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
import nc from "next-connect"; | |
const { setQueues, BullAdapter, router } = require("bull-board"); | |
import emailQueue from 'queues/emailQueue'; // or wherever your queues lie | |
setQueues([ | |
new BullAdapter(emailQueue), | |
]); | |
const handler = nc().use( | |
"/api/admin/queues", | |
(req, res, next) => { | |
req.proxyUrl = "/api/admin/queues"; | |
next(); | |
}, | |
router | |
); | |
export default handler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This particular config assumes the queues will be located here:
pages/api/admin/queues/[[...slug]].js
TODO: add basic authentication