view benchmark/bun-http-framework-benchmark/src/node/elysia.js @ 215:c3df85159b31

removed a python library that isn't used for much.
author June Park <parkjune1995@gmail.com>
date Sat, 28 Feb 2026 20:34:18 -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)