Mercurial
view benchmark/bun-http-framework-benchmark/src/node/elysia.js @ 186:8cf4ec5e2191 hg-web
Fixed merge conflict.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:38:59 -0800 |
| parents | a8976a008a9d |
| children |
line wrap: on
line source
const { Elysia } = require('elysia') const { node } = require('@elysiajs/node') const app = new Elysia({ adapter: node() }) .get('/', () => 'Hi') .get('/id/:id', (c) => { c.set.headers['x-powered-by'] = 'benchmark' return `${c.params.id} ${c.query.name}` }) .post('/json', (c) => c.body, { type: 'json' }) .listen(3000)