Skip to content
atarashi
Documentation menu

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

VariableRequiredDescription
PORTnoPort the HTTP server listens on

What it contributes to other files

FileSlotLine
src/config/env.ts|jsenv-schemaPORT: z.coerce.number().int().positive().default(3000),
src/index.ts|jsimportsimport { serve } from '@hono/node-server';
src/index.ts|jsimportsimport { app } from './app.js';
src/index.ts|jsimportsimport { env } from './config/env.js';
src/index.ts|jsbootstrapserve({ 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.