Obinna Okafor

bun-node

Ten TypeScript packages for building servers on Bun, written by Obinna Kingsley Okafor and published on npm under @kingsleyweb.

Start a server

Install the HTTP layer, then write routes the way you would in Express.

bun add @kingsleyweb/bun-common
import { BunHttpAdapter } from "@kingsleyweb/bun-common";

const app = new BunHttpAdapter();
app.get("/hello/:name", (req, res) => {
  res.json({ hello: req.params.name });
});
await app.listen(3000);

Read the docs on GitHub

The packages

bun-common
An Express-like HTTP layer for Bun.serve: routing, validation, CORS, static files, compression, uploads and WebSockets.
bun-nest
Runs NestJS on Bun, with file uploads, WebSocket gateways and caching modules.
bun-contract
Typed API and WebSocket contracts over any Standard Schema library, safe to import in a browser.
bun-client
A typed HTTP client with retries, timeouts, server-sent events and WebSocket channels.
bun-jobs
Job queues and scheduled work over memory, files, Redis, SQL and MongoDB.
bun-cache
One caching API over memory, SQLite, Postgres, MySQL, Redis, MongoDB, S3, Azure and Cloudflare.
bun-sql
The shared SQL layer: dialects, schema sync, page cursors and connection helpers.
bun-security
Rate limits, bans, bot checks, security headers and request rules, decided inside your own service.
bun-auth
Mounts better-auth on a Bun server, with typed sessions and route guards.
bun-ui
Browser dashboards for jobs and security, and a viewer for OpenAPI and AsyncAPI documents.