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

Function layerConfig

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

Source from the content-addressed store, hash-verified

316 * @since 4.0.0
317 */
318export const layerConfig = <R extends string>(
319 options: Config.Wrap<
320 ServeOptions<R> & {
321 readonly disablePreemptiveShutdown?: boolean | undefined
322 readonly gracefulShutdownTimeout?: Duration.Input | undefined
323 readonly websocket?: WebSocketOptions | undefined
324 }
325 >
326): Layer.Layer<
327 Server.HttpServer | HttpPlatform | FileSystem.FileSystem | Etag.Generator | Path.Path,
328 ConfigError
329> =>
330 Layer.mergeAll(
331 Layer.effect(Server.HttpServer)(Effect.flatMap(Config.unwrap(options), make)),
332 layerHttpServices
333 )
334
335// -----------------------------------------------------------------------------
336// Internal

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected