You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey!
I really really love effect-ts and want to build a server framework that would be native for that ecosystem. After many (many) trials and errors, it was quite obvious that nitro has the best mix of tooling, performance, ergonomics, magic, and control for my purpose. The only issue I face is that effect-ts has its own runtime it needs to execute in (like how react and vue have their own runtimes, I don't mean like node, bun, deno, and such). I could not find a way to interop the two... Theres also the typescript obstacle, where the types for defineEventHandler need to change a bit to allow the use case.
I believe it is technically possible, as there are may elements thats are generated and not hard-coded. But I need an expert to assist me 😄
Basically I need a way to have code that reads like this:
(this is grossly oversimplified on both ends, I just wanted to express that nitro needs to exist within the runtime.)
and then this:
// @routes/hello.ts// instead of the normal () => A | Promise<A>// should be () => Effect<R,E,A> exportdefaultdefineEventHandler(()=>Effect.succeed("world"))
(calling /hello would return "world")
Effect have their own concurrency, batching, caching, dependency injection, schema validation, streams, and many more capabilities. So as I said, this is grossly oversimplified. I know I might be able to just construct such a thing around h3, but I want to first try doing it with nitro before I submit myself to reimplementing the entire thing
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey!
I really really love effect-ts and want to build a server framework that would be native for that ecosystem. After many (many) trials and errors, it was quite obvious that nitro has the best mix of tooling, performance, ergonomics, magic, and control for my purpose. The only issue I face is that effect-ts has its own runtime it needs to execute in (like how react and vue have their own runtimes, I don't mean like node, bun, deno, and such). I could not find a way to interop the two... Theres also the typescript obstacle, where the types for
defineEventHandler
need to change a bit to allow the use case.I believe it is technically possible, as there are may elements thats are generated and not hard-coded. But I need an expert to assist me 😄
Basically I need a way to have code that reads like this:
(this is grossly oversimplified on both ends, I just wanted to express that nitro needs to exist within the runtime.)
and then this:
(calling
/hello
would return "world")Effect have their own concurrency, batching, caching, dependency injection, schema validation, streams, and many more capabilities. So as I said, this is grossly oversimplified. I know I might be able to just construct such a thing around h3, but I want to first try doing it with nitro before I submit myself to reimplementing the entire thing
Beta Was this translation helpful? Give feedback.
All reactions