| 916 | * @since 4.0.0 |
| 917 | */ |
| 918 | export 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 |