| 464 | * @since 4.0.0 |
| 465 | */ |
| 466 | export const layerConfig = ( |
| 467 | evaluate: LazyArg<Http.Server>, |
| 468 | options: Config.Wrap<Options> |
| 469 | ): Layer.Layer< |
| 470 | HttpServer.HttpServer | NodeServices.NodeServices | HttpPlatform.HttpPlatform | Etag.Generator, |
| 471 | ServeError | Config.ConfigError |
| 472 | > => |
| 473 | Layer.mergeAll( |
| 474 | Layer.effect(HttpServer.HttpServer)( |
| 475 | Effect.flatMap(Config.unwrap(options), (options) => make(evaluate, options)) |
| 476 | ), |
| 477 | layerHttpServices |
| 478 | ) |
| 479 | |
| 480 | /** |
| 481 | * Provides a test HTTP server listening on an ephemeral port together with a |