Mercurial
comparison benchmark/bun-http-framework-benchmark/src/node/express.js @ 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 const express = require('express') | |
| 2 | |
| 3 express() | |
| 4 .use(express.json()) | |
| 5 .get('/', (req, res) => { | |
| 6 res.setHeader('content-type', 'text/plain').send('Hi') | |
| 7 }) | |
| 8 .post('/json', ({ body }, res) => { | |
| 9 res.json(body) | |
| 10 }) | |
| 11 .get('/id/:id', ({ params: { id }, query: { name } }, res) => { | |
| 12 res.setHeader('x-powered-by', 'benchmark') | |
| 13 .setHeader('content-type', 'text/plain') | |
| 14 .send(`${id} ${name}`) | |
| 15 }) | |
| 16 .listen(3000) |