Mercurial
comparison benchmark/bun-http-framework-benchmark/src/bun/wobe.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 { Wobe } from 'wobe' | |
| 2 | |
| 3 new Wobe() | |
| 4 .get('/', (ctx) => ctx.res.sendText('Hi')) | |
| 5 .post('/json', async (ctx) => { | |
| 6 return ctx.res.sendJson(await ctx.request.json()) | |
| 7 }) | |
| 8 .get('/id/:id', (ctx) => { | |
| 9 ctx.res.headers.set('x-powered-by', 'benchmark') | |
| 10 | |
| 11 return ctx.res.sendText(ctx.params.id + ' ' + ctx.query.name) | |
| 12 }) | |
| 13 .listen(3000) |