Changelog - 2026-09-06
configs.server - Bun.serve options without re-implementing startBunModule
New FeatureIn one line. Two Bun.serve options an application has a reason to change now live in the application config; nothing else about the socket changes.
What changed
IServerApplicationConfigs.serveris a new optional group:{ idleTimeout?: number; maxRequestBodySize?: number }, typed by the newIServerRuntimeConfigs.idleTimeoutis in seconds and Bun caps it at 255.maxRequestBodySizeis in bytes.- Unset keys keep Bun's defaults. A key set to
undefinedbehaves like one left out. - Other
Bun.serveoptions. OverrideServerApplication.getServerRuntimeOptions()and extend the object it returns. - Node runtime.
startNodeModule()logs one warning naming the ignored keys and ignores the group.
typescript
export const configs: IServerApplicationConfigs = {
path: { base: '/api', isStrict: true },
server: {
idleTimeout: 60,
maxRequestBodySize: 50 * 1024 * 1024,
},
};Who is affected
- Applications that override
startBunModule()to change one option. Delete the override and set the option underconfigs.server. The override still compiles, but the copy misses later fixes to the start path. - Applications on the node runtime. Nothing changes. If you set
configs.serverthere, the boot log carries one warning and the values are ignored. - Everyone else. No action needed.
Details
- Reference: Application.