Replies: 14 comments 10 replies
-
Honestly, it's been AMAZING, and it has become my favourite and goto webserver in TS.
(and some of the TypeScript errors on Eden side aren't the clearest and most of the times is just that they have mismatching versions of elysia) Otherwise, brilliant. I love it and I look forward to keep contributing to elysia and other packages. Thank you so much for this incredible tool. |
Beta Was this translation helpful? Give feedback.
-
It is possible to inject types by using the macro api? it would be great... |
Beta Was this translation helpful? Give feedback.
-
Great, using Elysia+Eden+Swagger for full stack API sharing on some new services. Really love the speed, both speed of DX and actual runtime performance.
zod integration would be nice, not typebox only. Am using zod elsewhere in the stack.
Query / body validation errors are super cryptic and don't tell you what's wrong, only that validation failed. Doesn't help you out much there. Also, not sure how error handling should be done, no docs on way to tell if error is instanceof elysia error or not so just duck type checking it in the onError handler. |
Beta Was this translation helpful? Give feedback.
-
Pretty damn good! Eden Treaty is the biggest draw for me
Automatic file based routing (preferably first party) that also works properly with Eden
Some of the design patterns are a bit strange, having a solid example of controller based routing would be helpful. Also GET with optimal parameters, but that's coming as of 1.1.0 so :P |
Beta Was this translation helpful? Give feedback.
-
Hey There. I have use Elysia mostly with HTMX, both in dev and production. How was your overall experience? Everything works seamlessly. What do you think is missing? Nothing. Any pain points you are having? I think couple of Types. For example if i need to pass JWT types into controllers, Thanks for building this tool! |
Beta Was this translation helpful? Give feedback.
-
I haven't spend that much time with Elysia, so my understanding is quite limited. For very small projects, the express-style API might be enough, but as soon as you add more than just a few routes (or the routes have complex implementations), you can easily end up creating a code mess. So I'm quite happy to see that MVC is supported, it could make the code more SOLID. I'm still not 100% sure how to use it based on the docs, or if I can achieve the same things I can with NestJS, but I'm enthusiastic about it :) I like the class-based approach of NestJS to define controllers and services. What I like the most about NestJS though is it's dependency injection capabilities, no other JS DI library comes close to it. What's not clear to me is how I would integrate Elysia's models with some ORM framework, e.g. TypeORM. Since I like the class-based approach for controllers, probably I'd also like models to be classes. I think I like Elysia's concept of a context and request dependent services. I'm not really sure how it would work when you have services depending on other services. One of the pain points in NestJS is that you are allowed to inject the request into your services, which re-creates the whole DI tree at every request (unless you think about this and implement something like AsyncLocalStorage). |
Beta Was this translation helpful? Give feedback.
-
I tried to convert my current project to Elysia, but the idea of putting my routes, controllers, and type validation in a single file with a unified chain of calls is really insane for me. Maybe I was structuring my project wrong due to my lack of knowledge, but when I finished converting my user routes, I started to lose productivity trying to find where some route code starts and ends. (The same for the type -checking definitions. My project got faster in running and responding to the requests, but the loss of readability and maintainability in the code made me roll back to Express. |
Beta Was this translation helpful? Give feedback.
-
OK, here it goes. The experience has been pretty smooth, but I must say we are using Node with Elysia. Better integration with Node would be nice. Other than that, it would be nice to have an api that would enable validating types without it throwing. Something like zod's My current use case includes aggregating data from multiple servers and then serving those, so I use a lot of custom typebox validations using Also, I have a lot of string enums so including one in Elysia would be nice. But in general it has been a breeze to work with, and I enjoy it quite a lot. One last thing that would be nice is if it was possible to navigate from eden api to the Elysia api definition, similar to trpc's goto definition. |
Beta Was this translation helpful? Give feedback.
-
I'd like some idiomatic way to perform custom validation, for cases where a static schema isn't feasible. Consider a route like this: new Elysia()
.post('/images/:id/crop', () => ..., {
query: t.Object({
height: t.Numeric({minimum: 1, maximum: ?}),
width: t.Numeric({minimum: 1, maximum: ?})
})
}) The maximum allowed value for Obviously, custom validation can be achieved with |
Beta Was this translation helpful? Give feedback.
-
I also just saw ArkType announce V2 which is a lot faster than zod so I'm wondering if it's fast enough to be integerated in to Elysia: |
Beta Was this translation helpful? Give feedback.
-
It would be nice if Elysia also expose current version that running on, it will have a good usage for plugin maintainers to control which version of Elysia is compatible with the plugin before actually running. export const plugin = () => {
return (app: Elysia) => {
console.log(app.runtime) // 1.0.21
}
} |
Beta Was this translation helpful? Give feedback.
-
Would love to also get the |
Beta Was this translation helpful? Give feedback.
-
First off: thank you for open sourcing this project! ❤️ I'm on the looks for an Api framework with TypeScript client and Swagger support - so currently testing out Elysia (migrating from Express+trpc) Feedback from an "Elysia noob" (me):
Not really on Elysia - something the community can help out on maybe?
Thanks again, take the feedback with a grain of salt - it's a five star library ⭐⭐⭐⭐ Kind regards Morten |
Beta Was this translation helpful? Give feedback.
-
Zod integration would be awesome! |
Beta Was this translation helpful? Give feedback.
-
We would like to hear your thoughts, and feedback on your experience with Elysia 1.0
If you would like some ideas, here are some examples:
Your feedback and ideas will be used to improve Elysia and the development of Elysia 1.1
Thank you
Beta Was this translation helpful? Give feedback.
All reactions