Skip to content

Installation

Install the package in a Bun project.

sh
bun add @almighty-shogun/bun-server
sh
npm install @almighty-shogun/bun-server
sh
pnpm add @almighty-shogun/bun-server
sh
yarn add @almighty-shogun/bun-server

Use it from Bun runtime code:

ts
import { createServer, defineRoute, HttpMethod } from '@almighty-shogun/bun-server';

const routes = {
    health: defineRoute('/health', HttpMethod.Get, (_, response) => {
        return response.json({ ok: true });
    })
};

createServer({ port: 3000, routes });

All packages are released under the MIT License.