view benchmark/bun-http-framework-benchmark/src/bun/elysia.ts @ 264:04fee26ecce0

add authenticated JRPG conversation platform Add reusable auth/session storage, owned conversation recovery, guest quotas, admin workflows, URL-routed conversation UI, mobile frame support, and parallel browser acceptance. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 07:34:12 -0700
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)