ElysiaJS. A high-performance, statically typed web framework famous for being faster than your caffeine jitters. It makes you realize how slow Express actually is.
It’s the framework of choice for developers who want the raw speed of the Bun runtime but still want their code to look like it was written by a human.
It was created in 2022 by the developer SaltyAom. And it’s widely believed to be named after the character Elysia from Honkai Impact 3rd. Because high-performance software engineering and anime addiction are basically the same Venn diagram at this point.
Elysia was built to solve a specific problem: Type safety usually comes with a tax—either a runtime performance penalty or extensive boilerplate. Elysia cheats the system by leveraging Bun's Just-In-Time compiler and TypeBox to give you end-to-end type safety with zero code generation. Unlike NestJS, you don't need a PhD in decorators to define a route, and unlike Express, it won't let you ship broken code to production.
To get started, install Bun, then create a file ending in .ts.
Initialize the app by calling new Elysia().
Define your logic using a chainable, fluent API. Use .get() to define a route. Notice how there are no complex return types—just return an object, and it automatically serializes it to JSON.
But the real magic happens when you handle data. Add a schema object to the route using the t variable. This validates incoming data at runtime and automatically infers the TypeScript types for your IDE. If you try to access a property that doesn't exist, the compiler yells at you before you even run the code.
It even features the "Eden Treaty," a system that allows your frontend to import the backend's type definitions directly, giving you autocompletion for your API calls on the client side.
Now, compile and run your code with bun run, and watch your server start up in microseconds.
Top comments (0)