v9.0.0
node-http-server 9.0.0 is a major modernization of the small, dependency-free static server.
Highlights
- CommonJS and ESM entry points with a Node.js 22.12+ runtime floor.
- Independent server instances, reliable
close()/redeploy lifecycle, and a modern dependency-free CLI. - Secure decoded-path containment, symlink/root escape protection, safe host routing, generic internal errors, redacted logging, and HTTPS fail-closed behavior.
- Streaming GET/HEAD responses, byte ranges, ETags, conditional requests, directory indexes, modern MIME handling, optional compression, and SPA fallback.
- Optional request-body limits and configurable socket, request, header, and keep-alive timeouts;
falseor0disables limits where documented. - Zero runtime dependencies. Coverage runs through the owner-maintained
vanilla-test@2.0.0, with measured line, function, and branch badges. - A multi-page developer site with complete API/configuration tables, migration/security guidance, and a full CJS/ESM/CLI/JSON configuration playground.
Read the migration guide before upgrading from v8. Full details are in the changelog.
The former repository certificate/private-key fixtures were removed from the active tree and npm package. Any historical copies must be treated as public and untrusted.