elysiajs.com
Open in
urlscan Pro
2606:4700:3033::ac43:c105
Public Scan
Submitted URL: http://elysiajs.com/
Effective URL: https://elysiajs.com/
Submission: On January 07 via api from US — Scanned from DE
Effective URL: https://elysiajs.com/
Submission: On January 07 via api from US — Scanned from DE
Form analysis
1 forms found in the DOM<form class="input font-medium !bg-gray-100 dark:!bg-slate-700"><span class="text-gray-400 dark:text-gray-300">localhost</span><input class="absolute" type="text" value="/hello"></form>
Text Content
Skip to content ElysiaJS SearchK Main NavigationQuick StartPluginsBlog GitHubTwitterDiscord Appearance GitHubTwitterDiscord ELYSIAJS ERGONOMIC FRAMEWORK FOR HUMANS TYPESCRIPT WITH END-TO-END TYPE SAFETY, UNIFIED TYPE SYSTEM AND OUTSTANDING DEVELOPER EXPERIENCE. SUPERCHARGED BY BUN. Get Started bun create elysia app See why developers love Elysia 21X FASTER THAN EXPRESS Supercharged by Bun runtime, Static Code Analysis, and Dynamic Code Injection Being one of the top-performing TypeScript frameworks. Comparable to Go and Rust. 1. Elysia Bun 2,454,631 req/s 2. Warp Rust 1,439,141 3. Swoole PHP 1,035,418 4. Echo Go 684,368 5. Gin Go 676,019 6. Chi Go 609,492 7. FastAPI PyPy 448,130 8. Fastify Node 415,600 9. Express Node 113,117 Measure in requests/second. Result from official TechEmpower Benchmark Round 22 (2023-10-17) in PlainText. MADE FOR HUMANS FOCUS ON PRODUCTIVITY ++ If you found yourself writing code for the framework, then there's something wrong with the framework. That's why Elysia invests time to experiment with design decisions to craft the most ergonomic way possible for everyone From built-in strict-type validation to a unified type system, and documentation generation, making an ideal framework for building servers with TypeScript. import { Elysia } from 'elysia' new Elysia() .get('/', () => 'Hello World') .get('/json', () => ({ hello: 'world' })) .listen(3000) JUST FUNCTION No need for an additional method, just return the value to send data back to the client. Whether it's a regular string, or complex JSON, just return the value and Elysia will handle the rest import { Elysia, t } from 'elysia' new Elysia() .post( '/profile', ({ body }) => body, { body: t.Object({ username: t.String() }) } ) .listen(3000) TYPE SAFETY Powered by TypeBox, Elysia enforces type-strict validation to ensure type integrity by default Elysia infers types to TypeScript automatically to create unified type system like statically typed language import { Elysia, t } from 'elysia' import { swagger } from '@elysiajs/swagger' import { users, feed } from './controllers' new Elysia() .use(swagger()) .use(users) .use(feed) .listen(3000) OPENAPI / SWAGGER Elysia generates OpenAPI 3.0 specs automatically to integrate with various tools across multiple languages Thanks to OpenAPI compliance, Elysia can generate Swagger in one line with the Swagger plugin. END–TO-END TYPE SAFETY Synchronize types across all applications. Move fast and break nothing like tRPC. See how it works // server.ts import { Elysia, t } from 'elysia' const app = new Elysia() .patch( '/user/age', ({ body }) => signIn(body), { body: t.Object({ name: t.String(), age: t.Number() }) } ) .listen(80) export type App = typeof app // client.ts import { edenTreaty } from '@elysiajs/eden' import type { App } from 'server' const eden = edenTreaty<App>('http://localhost') await eden.user.age.patch({ name: 'saltyaom', age: '21' }) Type 'string' is not assignable to type 'number' IT WORKS WITH THAT Being one of the most popular choices for a Bun web framework, likely there is a plugin for what you want. If the plugin you need is not there, it's easy to create one and share it with the community. Explore plugins 1. GraphQL Yoga 2. Swagger 3. tRPC 4. Vite 5. JWT 6. Web Socket 7. Clerk 8. Lucia Auth 9. Logger TRY IT OUT Being WinterCG compliant, Elysia can run in your browser! Edit the code and see live update immediately. const app = new Elysia() .get('/', () => 'Hello!') // Try edit this line .get('/hello', () => 'Hello from Elysia!') .listen(80) export default app localhost Hello from Elysia! CAN'T FIND WHAT YOU'RE LOOKING FOR? JOIN THE COMMUNITY Elysia is one of the biggest communities for Bun first web frameworks. You can ask your questions / propose a new feature / file a bug with our community and mainters. START IN MINUTES SCAFFOLD YOUR PROJECT, AND RUN SERVER IN NO TIME bun create elysia app Introduction At glance Built with 💖 dear Elysia