http/hono
Hono HTTP server on the Node adapter, with a health check and a versioned route prefix.
Provides: http, http:hono
Requires: runtime:node, config:env
Conflicts with: http
Files it writes
src/app.ts|js
Dependencies
hono@^4.9.10@hono/node-server@^1.19.5
Environment
| Variable | Required | Description |
|---|---|---|
PORT | no | Port the HTTP server listens on |
What it contributes to other files
| File | Slot | Line |
|---|---|---|
src/config/env.ts|js | env-schema | PORT: z.coerce.number().int().positive().default(3000), |
src/index.ts|js | imports | import { serve } from '@hono/node-server'; |
src/index.ts|js | imports | import { app } from './app.js'; |
src/index.ts|js | imports | import { env } from './config/env.js'; |
src/index.ts|js | bootstrap | serve({ fetch: app.fetch, port: env.PORT }, (info) => { |
Use it
atarashi new my-app --add http/hono
atarashi add http/hono
Version 1.0.0. Format reference: Authoring blueprints.
Part of the atarashi documentation, written and maintained by Gautam Suthar.