Mercurial
comparison benchmark/bun-http-framework-benchmark/src/bun/elysia.ts @ 183:a8976a008a9d
[BenchMark] Added bun bench mark to test seoboe vs other popular benchmarks.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 21:19:08 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 179:8d17f6e6e290 | 183:a8976a008a9d |
|---|---|
| 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) |