Mercurial
comparison benchmark/bun-http-framework-benchmark/src/bun/fastify.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 fastify from "fastify" | |
| 2 | |
| 3 const server = fastify() | |
| 4 .get("/", () => "Hi") | |
| 5 .get("/id/:id", (req, res) => { | |
| 6 res.header("x-powered-by", "benchmark") | |
| 7 return `${req.params.id} ${req.query.name}` | |
| 8 }) | |
| 9 .post("/json", (req, _res) => req.body) | |
| 10 | |
| 11 server.listen({ port: 3000 }, function (err) { | |
| 12 if (err) { | |
| 13 server.log.error(err) | |
| 14 process.exit(1) | |
| 15 } | |
| 16 }); |