Frameworks
Bun.serve
Mount Workbench with @getworkbench/bun on Bun's native HTTP server.
Install
Shell
bun add @getworkbench/bun bullmqRequires Bun 1.1+.
Mount
TypeScript
import { Queue } from "bullmq";
import { workbench } from "@getworkbench/bun";
const emailQueue = new Queue("email", {
connection: { url: process.env.REDIS_URL! },
});
const handler = workbench({ queues: [emailQueue], basePath: "/jobs" });
Bun.serve({
port: 3000,
fetch(req) {
return handler(req, () => new Response("home"));
},
});The second argument to the handler is a fallback when the request doesn't match the dashboard routes.
Resources
- npm: @getworkbench/bun
- Example: examples/with-bun
- Blog: BullMQ dashboard for Bun