OptionalclientOptionalcontractThe shape of every response: errors, 404s, failed validations and the
ok()/list() helpers. Default: Iskra's (iskraContract), which the
SDKs read; problemDetailsContract() answers RFC 9457 problem details.
OptionalenvironmentOptionalfeaturesOptionalhostnameInterface to bind. Default "0.0.0.0" (all); use "127.0.0.1" for local only.
OptionalidleSeconds a connection may stay idle before Bun closes it (Bun default: 10).
OptionalincludeSend the stack, and the message and context of 5xx errors, in error responses. Default: only with NODE_ENV=development.
OptionalloggerWhere the Kernel and its features log (startup, fallbacks, errors they
handle). Default: the console. false: nothing. WebPlugin passes the
App's logger unless one is given here.
OptionalmaxLargest request body Bun.serve accepts, in bytes (413 above). Default 16 MiB.
OptionalportOptionalrouterThe app's routes: a Router (groups, priorities, unmatched) or a Hono app mounted at "/".
OptionalsecurityHeaders set on every response, merged over the defaults; false sets none.
OptionalshutdownHow long shutdown() waits for in-flight requests before closing connections, in ms. Default 5000.
OptionaltrustNumber of reverse proxies in front of the app (true = 1). Only then is
clientIpHeader used to identify clients (rate limiting); by default the
socket address is used. See getClientIp.
The header those proxies put the client address in:
'x-forwarded-for'(default) or'x-real-ip'. Only that one is read.