view benchmark/bun-http-framework-benchmark/src/bun/elysia.ts @ 211:a6d8d32a0261

[MrJuneJune] Simple animations for darkmode.
author MrJuneJune <me@mrjunejune.com>
date Sun, 15 Feb 2026 21:38:23 -0800
parents a8976a008a9d
children
line wrap: on
line source

import { Elysia, t } from 'elysia'

const app = new Elysia()
	.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, {
		parse: 'json'
	})
	.listen(3000)