Closed GodsonAddy closed 7 months ago
So this is how I solved it. I downloaded express and changed the basePath of the bull-board UI from pages/api/auth/admin/queues.js to pages/api/auth/admin/queues/[[...index]].js
/pages/api/auth/admin/queues/[[...index]].js
import { post } from "../../../../../queue.js";
import { createBullBoard } from "@bull-board/api";
import { BullAdapter } from "@bull-board/api/bullAdapter";
import { ExpressAdapter } from "@bull-board/express";
import express from "express";
const app = express();
const serverAdapter = new ExpressAdapter();
createBullBoard({
queues: [new BullAdapter(post)],
serverAdapter: serverAdapter,
});
serverAdapter.setBasePath("/api/auth/admin/queues");
app.use("/api/auth/admin/queues", serverAdapter.getRouter());
export default app;
Is it possible to integrate with NextJS App Router?
Above approach works, but requires Nextjs API route configuration in the Bullboard source file.
export const config = { api: { externalResolver: true, bodyParser: false } };
I would be glad if anyone could help implement the bull-board in the Nextjs app. I can't seem to make it work.
This is my code: