npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ahmedrowaihi/bull-board-fetch

v1.0.0

Published

Fetch adapter for bull-board - works with Node.js 18+ and Bun using web standard fetch API

Readme

@ahmedrowaihi/bull-board-fetch

Fetch adapter for bull-board. Works with Node.js 18+ and Bun using the web standard fetch API without requiring Hono or other frameworks.

Installation

# With Bun
bun add @ahmedrowaihi/bull-board-fetch @bull-board/api

# With npm/yarn/pnpm
npm install @ahmedrowaihi/bull-board-fetch @bull-board/api

Usage

import { createBullBoard } from "@bull-board/api";
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
import { FetchAdapter } from "@ahmedrowaihi/bull-board-fetch";
import { Queue } from "bullmq";

// Create your queues
const queue = new Queue("my-queue");

// Create the adapter
const serverAdapter = new FetchAdapter();
serverAdapter.setBasePath("/admin/queues");

// Create bull-board
createBullBoard({
  queues: [new BullMQAdapter(queue)],
  serverAdapter,
});

// Get the fetch handler
const handler = serverAdapter.getFetchHandler();

// Use with Bun's native server
export default {
  port: 3000,
  fetch: handler,
};

// Or with Node.js 18+ (using a fetch-compatible server)
// Example with a simple Node.js server:
import { createServer } from "node:http";

const server = createServer(async (req, res) => {
  const request = new Request(`http://${req.headers.host}${req.url}`, {
    method: req.method,
    headers: req.headers as HeadersInit,
    body: req.method !== "GET" && req.method !== "HEAD" ? req : undefined,
  });

  const response = await handler(request);
  
  res.writeHead(response.status, Object.fromEntries(response.headers.entries()));
  if (response.body) {
    const body = await response.arrayBuffer();
    res.end(Buffer.from(body));
  } else {
    res.end();
  }
});

server.listen(3000);

Features

  • ✅ Works with Bun's native fetch API
  • ✅ No Hono or other framework dependencies
  • ✅ Handles static file serving
  • ✅ Supports base path configuration
  • ✅ EJS template rendering for HTML views
  • ✅ Automatic path prefix injection for static assets

API

FetchAdapter

Methods

  • setBasePath(path: string): this - Set the base path for the dashboard
  • setStaticPath(staticRoute: string, staticPath: string): this - Set static file route and path
  • setViewsPath(viewPath: string): this - Set views/templates path
  • setErrorHandler(handler: (error: Error) => ControllerHandlerReturnType): this - Set error handler
  • setApiRoutes(routes: readonly AppControllerRoute[]): this - Set API routes
  • setEntryRoute(routeDef: AppViewRoute): this - Set entry route (HTML view)
  • setQueues(bullBoardQueues: BullBoardQueues): this - Set queues
  • setUIConfig(config: UIConfig): this - Set UI configuration
  • getFetchHandler(): (request: Request) => Promise<Response> - Get the fetch handler

Publishing

This package publishes TypeScript source directly (no build step required). To publish:

# Make sure you're logged into npm
npm login

# Update version in package.json if needed
# Then publish
npm publish --access public

Note: Make sure to update the repository.url in package.json with your actual GitHub repository URL before publishing.

License

MPL-2.0