comparison benchmark/bun-http-framework-benchmark/src/deno/hono.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 { Hono, RegExpRouter } from 'https://deno.land/x/[email protected]/mod.ts'
2
3 const app = new Hono({ router: new RegExpRouter() })
4
5 app.get('/', (c) => c.text('Hi'))
6 .post('/json', (c) => c.req.json().then(c.json))
7 .get('/id/:id', (c) => {
8 const id = c.req.param('id')
9 const name = c.req.query('name')
10
11 c.header('x-powered-by', 'benchmark')
12
13 return c.text(`${id} ${name}`)
14 })
15
16 Deno.serve(
17 {
18 port: 3000
19 },
20 app.fetch
21 )