A simple, zero-configuration command-line static HTTP server for local development, testing, and production.
http-server is a simple, zero-configuration command-line static HTTP server built with Node.js. It allows developers to quickly serve static files locally or in production without any setup, solving the need for a lightweight, instant web server for development, testing, and learning.
Developers, educators, and testers who need a fast, no-configuration HTTP server for local development, static site hosting, or prototyping web applications.
Developers choose http-server for its extreme simplicity and zero-configuration approach, which eliminates setup time while still offering production-ready features like compression, TLS, and proxy support, making it both beginner-friendly and powerful enough for real-world use.
A simple, zero-configuration, command-line http server
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Runs instantly with default settings; just type `npx http-server` to serve files from ./public or ./ with no setup required, as highlighted in the usage section.
Supports gzip and brotli compression via -g and -b flags, plus TLS/SSL for HTTPS and CORS headers, making it production-ready without extra plugins.
Automatically serves index.html for directories and 404.html for missing files, enabling seamless single-page app deployment without complex routing config.
Can forward unresolved requests to a proxy URL with -P option, useful for mocking APIs or combining with backend servers, as detailed in the proxy support section.
Enabling HTTPS requires generating SSL certificates manually with OpenSSL and managing passphrases via environment variables, which adds complexity for secure deployments.
Lacks built-in file watching and automatic browser refresh, a common feature in modern development servers, forcing developers to rely on external tools for live updates.
Does not support HTTP/2 or HTTP/3 out of the box, which might impact performance in production compared to servers like nginx or Caddy.