| 282 | * @since 4.0.0 |
| 283 | */ |
| 284 | export const layer = <R extends string>( |
| 285 | options: ServeOptions<R> & { |
| 286 | readonly disablePreemptiveShutdown?: boolean | undefined |
| 287 | readonly gracefulShutdownTimeout?: Duration.Input | undefined |
| 288 | readonly websocket?: WebSocketOptions | undefined |
| 289 | } |
| 290 | ): Layer.Layer< |
| 291 | | Server.HttpServer |
| 292 | | HttpPlatform |
| 293 | | Etag.Generator |
| 294 | | BunServices.BunServices |
| 295 | > => Layer.mergeAll(layerServer(options), layerHttpServices) |
| 296 | |
| 297 | /** |
| 298 | * Layer that starts a Bun HTTP server on an ephemeral port for tests. |