Small surface · native HTTP + HTTPS
Use a server your team can understand.
node-http-server combines native Node HTTP and HTTPS with direct CLI, CommonJS, and ESM interfaces, modern static-file behavior, explicit policy controls, and reproducible engineering evidence.
Decision signals
A small install with useful depth.
HTTP + HTTPSNative transports
0Runtime dependencies
CLI · CJS · ESMSupported entry styles
Node 22.12+Supported runtime
| Need | What node-http-server provides | Inspect it |
|---|---|---|
| Compact supply chain | Zero runtime dependencies and one exact owner-maintained development tool. | Dependency and verification contract |
| Direct interfaces | A global or npx CLI, named Server instances, and the original singleton in CommonJS and ESM. | Import matrix |
| Native HTTP + HTTPS | HTTP-only, HTTPS-only, and paired listeners through Node's built-in networking modules. | HTTPS modes and examples |
| Modern static delivery | Streaming, HEAD, ranges, conditional requests, cache controls, Brotli/gzip, SPA fallback, and MIME controls across both transports. | Static-server settings |
| Explicit boundaries | Localhost binding, root containment, dotfile policy, Host routing, request limits, timeouts, and HTTPS. | Operations and security |
| Application hooks | Raw-request, parsed-request, before-serve, after-serve, custom logging, and deliberate file serving. | Hook contract |
| Measured delivery | Focused behavior suites, per-file native V8 coverage, package smoke checks, and reproducible benchmarks. | Performance evidence |
Project fit
Move from local files to an embedded server.
Local and CI assets
Serve a build directory with one command, an explicit root, and an OS-selected port when needed.
CLI task recipes →Static applications
Enable SPA fallback, compression, caching, extension policy, and request logs through one Config object.
SPA example →Embedded tooling
Create isolated server instances, intercept requests, generate responses, and close every listener through a Promise.
Lifecycle example →Controlled exposure
Choose the listen interface, accepted Host values, roots, HTTPS material, request limits, and timeouts.
Configuration reference →Engineering evidence
Inspect the behavior and the measurements.
| Evidence | What it answers | Source |
|---|---|---|
| Focused test sets | Which unit, functional, integration, and regression contracts currently pass? | Test inventory |
| Native V8 coverage | Which shipped files meet line, function, branch, and statement gates? | Coverage method |
| Core comparison | How does the current release compare with 9.0.2 on targeted hot paths? | Core results |
| Operational benchmark | How does the server behave on this machine across real public request paths? | Live benchmark |