Mercurial
comparison benchmark/bun-http-framework-benchmark/src/bun/wobe.ts @ 186:8cf4ec5e2191 hg-web
Fixed merge conflict.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:38:59 -0800 |
| parents | a8976a008a9d |
| children |
comparison
equal
deleted
inserted
replaced
| 176:fed99fc04e12 | 186:8cf4ec5e2191 |
|---|---|
| 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) |