Structuring API Handlers in Effect-HTTP: Best Practices and Challenges
Is it weird to create the same api in effect-http more than once? It feels like it is, but its the only way (maybe this is a project structuring issue) where i've been able to abstract my route handlers.
i've structured it like this roughly
src/ endpoint1 handlers/ <-- create api for just this endpoint to pass to RouteBuilder.handler responses/ schemas/ spec.ts ...more folders of endpoints index.ts <-- create api and run server
src/ endpoint1 handlers/ <-- create api for just this endpoint to pass to RouteBuilder.handler responses/ schemas/ spec.ts ...more folders of endpoints index.ts <-- create api and run server
So my thought is, either
a) i need to move my handlers b) I can create an Api in my folder, and somehow "compose" them although i haven't seen how c) I can create multiple "variables" of the same api (one for handler) and one for the index.ts to pass to the program.