MCPcopy Create free account
hub / github.com/Effect-TS/effect / layer

Function layer

packages/platform/bun/src/BunHttpServer.ts:284–295  ·  view source on GitHub ↗
(
  options: ServeOptions<R> & {
    readonly disablePreemptiveShutdown?: boolean | undefined
    readonly gracefulShutdownTimeout?: Duration.Input | undefined
    readonly websocket?: WebSocketOptions | undefined
  }
)

Source from the content-addressed store, hash-verified

282 * @since 4.0.0
283 */
284export 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.

Callers 1

BunHttpServer.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected