interface BunServer

Bun server handle (from Bun.serve).

Methods

stop(): void

Stops the server gracefully.

optional
upgrade(
request: Request,
options: { data: BunSocketData; headers?: Headers; }
): boolean

Upgrades an inbound request to a WebSocket.

Optional so a host injected before this seam existed still satisfies the interface; when absent, the adapter refuses upgrades with 501.

Usage

import { type BunServer } from "runtime/src/index.ts";