jsdrop.

Hono starter

A small, fast web app with Hono on Node.

Open in editor Free. Runs in your browser, no sign-up.
  • @hono/node-server
  • hono
Hono

The code

Two files, exactly what you get in the editor.

import { Hono } from 'hono'
import { serve } from '@hono/node-server'

const app = new Hono()

app.get('/', (c) =>
  c.html(`<h1>Hello, Hono!</h1><p>JSON lives at <a href="/api/time">/api/time</a>.</p>`),
)

app.get('/api/time', (c) => c.json({ now: new Date().toISOString() }))

app.get('/api/greet/:name', (c) => c.json({ greeting: `Hi, ${c.req.param('name')}!` }))

const port = Number(process.env.PORT) || 3000
serve({ fetch: app.fetch, port }, (info) => console.log(`Hono on port ${info.port}`))
{
  "name": "hono-app",
  "private": true,
  "type": "module",
  "dependencies": {
    "@hono/node-server": "^1.19.0",
    "hono": "^4.9.0"
  }
}

Questions

Can I run Hono in the browser?

Yes. Press Run and the program runs in a Node.js-compatible runtime, compiled to WebAssembly, right in your browser tab. npm packages install in the browser too.

How do I start a Hono project online?

Click Open in editor. jsdrop copies this starter into a new drop with index.ts and package.json. Press Run to start it, and edit as you go.

Can other people reach my server?

Yes. When the program calls listen(), the preview shows the server and a public tunnel URL that works while your tab runs it. With Pro, deploy the drop to run around the clock at its own address.

Is it free?

Yes. Public drops, running in the browser, live collaboration, versions, and embeds are free, and you do not need an account to start.

More starter kits