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