Render contextual errors? This enables bun's error page
interface
Serve.BaseServeOptions
interface BaseServeOptions<WebSocketData>
- id?: null | string
Uniquely identify a server instance with an ID
When bun is started with the
--hot
flag:This string will be used to hot reload the server without interrupting pending requests or websockets. If not provided, a value will be generated. To disable hot reloading, set this value to
null
.When bun is not started with the
--hot
flag:This string will currently do nothing. But in the future it could be useful for logs or metrics.
- tls?: TLSOptions | TLSOptions[]
Set options for using TLS with this server
const server = Bun.serve({ fetch: request => new Response("Welcome to Bun!"), tls: { cert: Bun.file("cert.pem"), key: Bun.file("key.pem"), ca: [Bun.file("ca1.pem"), Bun.file("ca2.pem")], }, });