server.ts
This file
Path
src/adapter/bun/server.ts
15 lines · 464 bytes · TypeScript
Last changed by
feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d
History of this fileTake it
The walk stopped after 200 commits: lines older than f0b094d point at it.
Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 1–11why, one step back1/**2 * Getting Bun Server Object for Bun adapters3 * @module4 */5import type { Context } from '../../context'67/**8 * Get Bun Server Object from Context9 * @template T - The type of Bun Server10 * @param c Context11 * @returns Bun Serverfeat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d
line 12why, one step back12 * @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 13–15why, one step back13 */14export const getBunServer = <T>(c: Context): T | undefined =>15 ('server' in c.env ? c.env.server : c.env) as T | undefined