Effect CommunityEC
Effect Community•3y ago•
12 replies
Patrick Roza

`Http.server.serve` Effect with `A` as `never` prevents workers from running

why does Http.server.serve return an Effect with A as never
it seems to indeed never return, so if im trying to launch multiple layers in order: Workers.pipe(Layer.use(HttpLive), Layer.launch) my workers will never run.
The point of Layer.launch is exactly to cover the case of remaining alive until interrupted, so it seems odd serve spins 🙂
This works of course: Layer.mergeAll(HttpLive, Workers), but there is no order then.
as workaround I can do an Effect.fork on the serve call, the server remains up.
Was this page helpful?