sukovanej / effect-http

Declarative HTTP API library for effect-ts
https://sukovanej.github.io/effect-http
MIT License
220 stars 16 forks source link

Embeddable examples similar to Hono? #561

Open danielo515 opened 1 month ago

danielo515 commented 1 month ago

I have an already existing Astro server, but I'm looking for a way to have type safety cross boundaries (RPC style). This library seems like a good fit to build such foundation, but as I mentioned, I need to embed it inside my existing ASTRO backend. Hono has a similar feature that allows to embed it within other servers. As far as I know, all I need is a function capable of dealing with a request (perform some routing too) and returns a response. Is this possible? Do you have any examples ?

sukovanej commented 1 month ago

Hey, I don't have any experience with astro. But the integration of an effect-http app should be the same as integrating @effect/platform app / router (the RouterBuilder.build create an instance of /platform app) so you can try to ask on the Effect discord, maybe some people already dealt with it. 🙂