shellphone.app/server/queues.ts

16 lines
451 B
TypeScript
Raw Permalink Normal View History

2022-06-26 15:01:55 +00:00
import { ExpressAdapter } from "@bull-board/express";
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
import { createBullBoard } from "@bull-board/api";
import queues from "~/queues";
export function setupBullBoard() {
const serverAdapter = new ExpressAdapter();
createBullBoard({
queues: queues.map((queue) => new BullMQAdapter(queue)),
2022-06-26 15:01:55 +00:00
serverAdapter,
});
serverAdapter.setBasePath("/admin/queues");
return serverAdapter;
}