Avoid request-time HttpApi layer provisioning (#25179)

This commit is contained in:
Kit Langton
2026-04-30 19:36:57 -04:00
committed by GitHub
parent 510f01674a
commit 2dd1f2d453
7 changed files with 58 additions and 48 deletions
@@ -74,11 +74,10 @@ function app(input?: { password?: string; username?: string }) {
function uiApp(input?: { password?: string; username?: string; client?: Layer.Layer<HttpClient.HttpClient> }) {
const handler = HttpRouter.toWebHandler(
Layer.effectDiscard(
HttpRouter.use((router) =>
Effect.gen(function* () {
const fs = yield* AppFileSystem.Service
const client = yield* HttpClient.HttpClient
const router = yield* HttpRouter.HttpRouter
yield* router.add("*", "/*", (request) => serveUIEffect(request, { fs, client }))
}),
).pipe(