Elysia is a Bun-first web framework that's the fastest TypeScript backend framework. It achieves Express-like DX with 18x better performance through Bun's native speed and ahead-of-time compilation.
Why Elysia is the Fastest
A team benchmarked their Express API against Elysia on Bun. Same routes, same logic. Elysia handled 180K requests/second vs Express's 10K. That's 18x more throughput on the same hardware.
Key Features:
- Bun-Native — Built for Bun runtime, maximum performance
- End-to-End Type Safety — Like tRPC but for REST
- Eden Treaty — Auto-generated type-safe client
- Validation — Built-in request/response validation
- Plugins — JWT, CORS, Swagger, GraphQL
Quick Start
bun create elysia app
cd app && bun run dev
import { Elysia, t } from "elysia"
const app = new Elysia()
.get("/", () => "Hello Elysia!")
.get("/users/:id", ({ params: { id } }) => ({ id, name: "Alice" }))
.post("/users", ({ body }) => ({ created: true, ...body }), {
body: t.Object({ name: t.String(), email: t.String() })
})
.listen(3000)
Eden Treaty (Type-Safe Client)
import { treaty } from "@elysiajs/eden"
import type { App } from "./server"
const api = treaty<App>("localhost:3000")
const { data } = await api.users({ id: "1" }).get() // Fully typed!
Why Choose Elysia
- 18x faster than Express
- Type-safe client — auto-generated from routes
- Bun ecosystem — leverage Bun's speed
Check out Elysia docs to get started.
Building fast APIs? Check out my Apify actors or email spinov001@gmail.com for custom solutions.
Top comments (0)