14 lines
560 B
Markdown
14 lines
560 B
Markdown
|
|
tests: coding ability, elysia/bun knowledge, route handling
|
||
|
|
context: none
|
||
|
|
version: 1
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
write a minimal elysia (bun) http server in a single file. it should have three routes:
|
||
|
|
|
||
|
|
GET /health — returns { status: "ok" }
|
||
|
|
GET /users — returns a hardcoded array of 2-3 user objects with id, name, and email fields
|
||
|
|
POST /users — accepts a JSON body with name and email, logs the received data to console, and returns { received: true }
|
||
|
|
|
||
|
|
no database, no auth, no external dependencies beyond elysia itself. the file should be runnable with `bun run index.ts`.
|