Learn more about Mintlify
Enter your email to receive updates about new features and product releases.
Use Elysia with Bun for type-safe APIs
bun add elysia
import { Elysia } from "elysia"; const app = new Elysia() .get("/", () => "Hello Elysia") .get("/json", () => ({ message: "Hello JSON" })) .listen(3000); console.log(`Server running at http://localhost:${app.server?.port}`);
import { Elysia, t } from "elysia"; new Elysia() .post("/user", ({ body }) => ({ id: 1, ...body }), { body: t.Object({ name: t.String(), email: t.String() }) }) .listen(3000);