Files
main.tsmain
What you'll learn
- See that a Hono app is a fetch handler: a Request in, a Response out, the same code on Cloudflare Workers, Bun, Deno, Node and in this tab
- Register a route with app.get() and answer it with c.text() or c.json()
- Export the app as the default export, which is what every runtime calls
Press Run tests to start the app. Its log appears here.Graded endpoints
c.text() answers with the text and a text/plain content type
c.json() serialises the object and sets application/json