/Knowledge/sources/honojs__hono/llms-full/node-js-hello-world--4564c748ba46.md
Node.js: Hello World - hono-docs
Node.js: Hello World Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt 2 hello world Summary Edit src/in...
Node.js: Hello World
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#2-hello-world
Summary
Edit src/index.ts: ts import { serve } from '@hono/node-server' import { Hono } from 'hono' const app = new Hono() app.get('/', (c) => c.text('Hello Node.js!')) serve(app) If you want to gracefully shut down the server, write it...
Content
Edit src/index.ts:
import { serve } from '@hono/node-server'
import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => c.text('Hello Node.js!'))
serve(app)
If you want to gracefully shut down the server, write it like this:
const server = serve(app)
// graceful shutdown
process.on('SIGINT', () => {
server.close()
process.exit(0)
})
process.on('SIGTERM', () => {
server.close((err) => {
if (err) {
console.error(err)
process.exit(1)
}
process.exit(0)
})
})
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#2-hello-world",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Node.js > 2. Hello World",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 453,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Node.js: Hello World",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}