@avedon/adapter-bun
v6.0.1
Published
Bun adapter for avedon. Emits a `Bun.serve` production server with Node-parity static files, SSG HTML, and ISR (stale-while-revalidate).
Readme
@avedon/adapter-bun
Bun adapter for avedon. Emits a Bun.serve production server with Node-parity static files, SSG HTML, and ISR (stale-while-revalidate).
Config
import { bunAdapter } from '@avedon/adapter-bun'
export default {
adapter: bunAdapter({ out: 'build' }),
}Build and run
pnpm build # avedon build → build/
bun run build/server.jsRequires Bun. Set PORT to change the listen port (default 3000).
Sessions
Same as Node: provide SESSION_SECRET in the environment (at least 32 characters) when using sealed sessions.
Behavior
- Static assets under
build/clientwith path-traversal guards - SSG HTML served from disk; routes with
revalidateuse SWR regeneration - All other requests go through
createHandler(SSR streaming, actions, APIs)
