@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.5
682 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
81 /100 Excellent
Development Activity 80
Maintenance 88
Community 60
Maturity 56
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
88 /100 Excellent
Architecture 88
Code Quality 86
Innovation 90
Learning Curve 88

@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 37 apps in this directory

TypeScript
88%
MIT

Mistle

AI Agents · Developer Tools

95

Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.

View details
50
Repo Health
76
Technical
70
Dependency
Built with
TypeScript 88%
Rust 11%
Updated 3 weeks ago
TypeScript
99%
Apache 2.0

Nordcraft

Low Code Platforms · No Code Platforms

492

Build high-performance server-rendered web apps with a visual editor, formula engine, and self-hostable backend — all in TypeScript.

View details
84
Repo Health
81
Technical
74
Dependency
Built with
TypeScript 99%
Updated 6 days ago
TypeScript
97%
GPL 3.0

OpenKnowledge

Code Editors · Knowledge Management · Note Taking

4,674

A beautiful, local-first markdown IDE that turns any git repo into a live collaborative workspace for humans and AI coding agents like Claude, Codex, and OpenCode.

View details
80
Repo Health
89
Technical
64
Dependency
Built with
TypeScript 97%
Updated 5 days ago
TypeScript
90%
MIT

open-pencil

AI Design Tools · Design Tools

9,227

An open-source design editor that reads native Figma files, ships a built-in AI assistant with 100+ design tools, and offers real-time serverless collaboration — all without giving up your files.

View details
84
Repo Health
78
Technical
69
Dependency
Built with
TypeScript 90%
Updated 6 days ago
TypeScript
93%
Apache 2.0

Openship

Devops · Hosting Control Panel

14,912

Openship is an open-source, self-hostable deployment platform that points at a repo and builds, ships, routes, and TLS-terminates the app — driven from a desktop app, web dashboard, or CLI.

View details
84
Repo Health
85
Technical
65
Dependency
Built with
TypeScript 93%
Updated 5 days ago
TypeScript
85%
MIT

openwork

AI Assistants · Automation

24,237

OpenWork is a free, open-source desktop app for running AI agent workflows on your own files with 50+ LLMs, extensible skills, and MCP server support — the open-source alternative to Claude Cowork and Codex.

View details
87
Repo Health
89
Technical
67
Dependency
Built with
TypeScript 85%
Updated 5 days ago
TypeScript
94%
AGPL 3.0

Papra

Bookmarks Archiving

5,587

Self-hosted document archiving with email ingestion, OCR full-text search, and pluggable storage — store once, find anything.

View details
86
Repo Health
82
Technical
69
Dependency
Built with
TypeScript 94%
Updated 6 days ago
Python
49%
Other

Arize Phoenix

Analytics · Devops · Monitoring

11,976

Open-source AI observability platform for tracing, evaluating, and debugging LLM applications with built-in intelligence and MCP support.

View details
92
Repo Health
88
Technical
67
Dependency
Built with
Python 49%
TypeScript 43%
Updated 5 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 5 days ago

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