Mercurial
comparison benchmark/bun-http-framework-benchmark/src/bun/elysia.ts @ 185:dfdd66825396
Merged in keep alive changes and mrjunejune changes.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:22:30 -0800 |
| parents | a8976a008a9d |
| children |
comparison
equal
deleted
inserted
replaced
| 182:d6ab5921fedc | 185:dfdd66825396 |
|---|---|
| 1 import { Elysia, t } from 'elysia' | |
| 2 | |
| 3 const app = new Elysia() | |
| 4 .get('/', 'Hi') | |
| 5 .get('/id/:id', (c) => { | |
| 6 c.set.headers['x-powered-by'] = 'benchmark' | |
| 7 | |
| 8 return `${c.params.id} ${c.query.name}` | |
| 9 }) | |
| 10 .post('/json', (c) => c.body, { | |
| 11 parse: 'json' | |
| 12 }) | |
| 13 .listen(3000) |