comparison benchmark/bun-http-framework-benchmark/src/node/hyper-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 { Server } = require('hyper-express')
2
3 const app = new Server()
4
5 app.get('/', (req, res) => {
6 res.header('content-type', 'text/plain').send('Hi')
7 })
8
9 app.get('/id/:id', (req, res) => {
10 res.header('x-powered-by', 'benchmark')
11 res.header('content-type', 'text/plain')
12
13 res.send(`${req.path_parameters.id} ${req.query_parameters.name}`)
14 })
15
16 app.post('/json', async (req, res) => {
17 res.type('json')
18 res.send(JSON.stringify(await req.json()))
19 })
20
21 app.listen(3000)