For AI agents: the complete documentation index is available at /worker-manager/llms.txt, the full documentation bundle is available at /worker-manager/llms-full.txt, and this page is available as Markdown at /worker-manager/server-adapters/bun.md.

Bun

Bun. @worker-manager/bun targets Bun's native HTTP server.

Install

bun add @worker-manager/api @worker-manager/bun
import { createWorkerManagerBoard } from '@worker-manager/api';
import { BullMQAdapter } from '@worker-manager/api/bullMQAdapter';
import { BunAdapter } from '@worker-manager/bun';
import { Queue } from 'bullmq';

const queue = new Queue('my-queue', {
  connection: { host: 'localhost', port: 6379 },
});

const serverAdapter = new BunAdapter();
serverAdapter.setBasePath('/ui');

createWorkerManagerBoard({
  queues: [new BullMQAdapter(queue)],
  serverAdapter,
});

const workerManagerRoutes = serverAdapter.getRoutes();

Bun.serve({
  port: 3000,
  routes: {
    '/health': { GET: () => Response.json({ status: 'ok' }) },
    ...workerManagerRoutes,
  },
});

getRoutes() returns an object shaped for Bun.serve({ routes }). Spread it alongside your own routes, no separate router to mount.

Full runnable example

Next steps