Mercurial
comparison benchmark/bun-http-framework-benchmark/src/node/elysia.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 { Elysia } = require('elysia') | |
| 2 const { node } = require('@elysiajs/node') | |
| 3 | |
| 4 const app = new Elysia({ adapter: node() }) | |
| 5 .get('/', () => 'Hi') | |
| 6 .get('/id/:id', (c) => { | |
| 7 c.set.headers['x-powered-by'] = 'benchmark' | |
| 8 | |
| 9 return `${c.params.id} ${c.query.name}` | |
| 10 }) | |
| 11 .post('/json', (c) => c.body, { | |
| 12 type: 'json' | |
| 13 }) | |
| 14 .listen(3000) |