@hono/node-server

The official Node.js adapter that runs your Hono application on a native Node HTTP server using web-standard APIs.

Library
npm
v2.1.1
674stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
86/100Excellent
Development Activity96
Maintenance96
Community60
Maturity52
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
88/100Excellent
Architecture88
Code Quality86
Innovation90
Learning Curve88

@hono/node-server is the official adapter that lets you run a Hono application on Node.js without changing your handler code. Hono was originally built for edge runtimes like Cloudflare Workers, Deno, and Bun, and this package bridges that web-standard fetch model onto Node’s built-in http and http2 servers.

It ships lightweight Request and Response implementations that avoid unnecessary copying, giving benchmark throughput several times higher than a comparable Express server. Beyond the core serve() entry point, it bundles Node-specific helpers for static file serving, WebSocket upgrades, connection info, and direct access to the underlying Node request/response objects.

What You Get

  • A one-line serve(app) entry point that boots a native Node HTTP (or HTTP/2, or HTTPS) server for any Hono app.
  • Lightweight Request/Response shims that override the global objects for markedly faster throughput than a plain Express server.
  • A Node-native serve-static middleware with precompression, path rewriting, and found/not-found hooks.
  • First-class WebSocket upgrade support via upgradeWebSocket backed by a ws WebSocketServer.
  • Helpers for connection info (getConnInfo) and typed access to the raw Node IncomingMessage / ServerResponse through c.env.

Common Use Cases

  • Deploying a Hono API to a traditional Node.js host, container, or VM instead of an edge runtime.
  • Serving static assets and a Hono API from the same Node process.
  • Adding realtime WebSocket endpoints to a Hono application running on Node.
  • Migrating an existing Node.js HTTP service to Hono incrementally by responding directly from the Node API where needed.

Under The Hood

Architecture — The adapter is organized as a thin bridge over Node’s HTTP stack. server.ts exposes createAdaptorServer/serve, which build a native node:http (or a user-supplied HTTP/2 or HTTPS) server whose request handler comes from getRequestListener in listener.ts. That listener is the core: it wraps each Node IncomingMessage in a lightweight web Request (request.ts), invokes the app’s fetch callback, and streams the returned Response back through response.ts, using symbol-tagged internal state, explicit incoming-body draining, and configurable auto-cleanup to keep half-read connections from stalling the server. Peripheral concerns are isolated in their own modules — websocket.ts (upgrade handling atop a ws server), serve-static.ts, conninfo.ts, and url.ts.

Tech Stack — The package is written almost entirely in TypeScript (~99%) with zero runtime dependencies; hono is a ^4 peer dependency and ws is optional for WebSockets. It targets Node >=20 and builds only on the standard library (node:http, node:http2, node:stream, node:net, node:tls). Tooling is modern: tsdown for the dual ESM/CJS build with subpath exports, Vitest plus supertest for tests, publint for package linting, and ESLint/Prettier for style.

Code Quality — Fifteen Vitest test files exercise the listener, request/response shims, WebSockets, conninfo, serve-static, and edge cases like client disconnects, giving strong coverage of the tricky streaming paths. The code is carefully typed, leans on Symbols for private state, mirrors native Request/Response semantics closely (including guarding against re-reading consumed bodies), and handles resource cleanup and error translation (RequestError, toRequestError) explicitly rather than swallowing failures.

API Design — The public surface is deliberately minimal: serve(app) is a genuine one-liner, and everything else is opt-in through a well-typed Options object (port, hostname, createServer, serverOptions, websocket, overrideGlobalObjects, autoCleanupIncoming). Extra capabilities live behind clean subpath imports (@hono/node-server/serve-static, /conninfo, /utils/response), and the README is thorough with runnable examples for every option, HTTPS, HTTP/2, UNIX sockets, and the raw-Node escape hatch — so getting started requires almost no boilerplate.

Used by 35 apps in this directory

TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

167

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
30
Repo Health
70
Technical
63
Dependency
Built with
TypeScript76%
MDX18%
Updated 1 years ago
TypeScript
86%
MIT

Agents Observe

Developer Tools

652

A real-time, fully local observability dashboard for Claude Code and Codex agent sessions — filtering, search, session replay, and token/cost breakdowns via an auto-starting MCP server.

View details
71
Repo Health
67
Technical
77
Dependency
Built with
TypeScript86%
JavaScript11%
Updated 4 weeks ago
TypeScript
50%
Other

Dify

No Code Platforms · AI Development · Developer Tools

152,883

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
71
Dependency
Built with
TypeScript50%
Python47%
Updated today
TypeScript
92%
AGPL 3.0

Documenso

Digital Signiture

14,603

Self-hosted, open-source DocuSign alternative with legally binding PDF signatures, multi-party workflows, and a full REST and tRPC API.

View details
93
Repo Health
79
Technical
72
Dependency
Built with
TypeScript92%
Updated today
TypeScript
99%
Other

Dokploy

Devops · Hosting Control Panel · Security

36,702

Self-hosted PaaS that deploys apps and databases on your own VPS using Docker, Traefik, and multi-build-system orchestration

View details
89
Repo Health
76
Technical
65
Dependency
Built with
TypeScript99%
Updated yesterday
TypeScript
95%
Apache 2.0

Enclosed

Security

2,060

Send end-to-end encrypted notes and files where the server never sees your content — true zero-knowledge sharing.

View details
57
Repo Health
88
Technical
71
Dependency
Built with
TypeScript95%
Updated 5 days ago
TypeScript
89%
Other

FastGPT

AI Agents · AI Development

29,387

Build, debug, and deploy knowledge-based AI agents with a visual workflow editor, RAG retrieval, and support for any OpenAI-compatible LLM.

View details
93
Repo Health
84
Technical
70
Dependency
Built with
TypeScript89%
Updated today
TypeScript
93%
Apache 2.0

flue

AI Agents · Developer Tools

7,953

Build autonomous AI agents and powerful workflows with a programmable TypeScript harness that gives any model sessions, tools, sandboxes, and durable execution.

View details
67
Repo Health
82
Technical
75
Dependency
Built with
TypeScript93%
Updated 1 weeks ago
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,367

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
66
Dependency
Built with
TypeScript71%
Go16%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search