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

Function layerConfig

packages/platform/node/src/NodeHttpServer.ts:918–930  ·  view source on GitHub ↗
(
  evaluate: LazyArg<Http.Server | Http2.Http2Server | Http2.Http2SecureServer>,
  options: Config.Wrap<Options>
)

Source from the content-addressed store, hash-verified

916 * @since 4.0.0
917 */
918export const layerConfig = (
919 evaluate: LazyArg<Http.Server | Http2.Http2Server | Http2.Http2SecureServer>,
920 options: Config.Wrap<Options>
921): Layer.Layer<
922 HttpServer.HttpServer | NodeServices.NodeServices | HttpPlatform.HttpPlatform | Etag.Generator,
923 ServeError | Config.ConfigError
924> =>
925 Layer.mergeAll(
926 Layer.effect(HttpServer.HttpServer)(
927 Effect.flatMap(Config.unwrap(options), (options) => make(evaluate, options))
928 ),
929 layerHttpServices
930 )
931
932/**
933 * Provides a test HTTP server listening on an ephemeral port together with a

Callers

nothing calls this directly

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected