Mercurial
comparison benchmark/bun-http-framework-benchmark/src/deno/acorn.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 { Router } from '@oak/acorn' | |
| 2 | |
| 3 const app = new Router() | |
| 4 | |
| 5 app.get('/', () => new Response('Hi')) | |
| 6 app.get('/id/:id', async (ctx) => { | |
| 7 return new Response(`${ctx.params.id} ${(await ctx.queryParams()).name}`, { | |
| 8 headers: { | |
| 9 'x-powered-by': 'benchmark' | |
| 10 } | |
| 11 }) | |
| 12 }) | |
| 13 app.post('/json', (ctx) => ctx.body()) | |
| 14 | |
| 15 app.listen({ port: 3000 }) |