comparison benchmark/bun-http-framework-benchmark/src/bun/nhttp.ts @ 185:dfdd66825396

Merged in keep alive changes and mrjunejune changes.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:22:30 -0800
parents a8976a008a9d
children
comparison
equal deleted inserted replaced
182:d6ab5921fedc 185:dfdd66825396
1 import { nhttp } from 'nhttp-land'
2
3 const app = nhttp()
4
5 app.get("/", () => "Hi")
6
7 app.post("/json", (rev) => rev.body)
8
9 app.get("/id/:id", (rev) => {
10 rev.response.setHeader("x-powered-by", "benchmark");
11
12 return `${rev.params.id} ${rev.query.name}`
13 })
14
15 app.listen(3000)