A 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 that allows developers to quickly serve static files locally or in production. It solves the need for a lightweight, no-fuss server for testing, development, and learning without requiring complex setup.
Developers, testers, and learners who need a fast, reliable static file server for local development, demos, or production static site hosting.
Developers choose http-server for its zero-configuration approach, extensive feature set including TLS/SSL and proxy support, and its balance of simplicity for beginners with robustness for production 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.
Can be run instantly with npx or a global install, serving files from the current directory without setup, as shown in the installation and usage examples.
Includes caching, gzip/brotli compression, CORS, and TLS/SSL support, making it robust enough for deploying static sites securely, as detailed in the options list.
Automatically serves index.html for directories and 404.html for missing files, ideal for single-page applications without extra configuration, as highlighted in the Magic Files section.
Can forward unresolved requests to a proxy URL with configurable options, enabling advanced routing for development, as demonstrated with the --proxy flag and proxy-config.
Cannot handle server-side logic or dynamic content generation, restricting it to purely static file serving, which the README implicitly admits by focusing on static features.
Setting up HTTPS requires generating self-signed certificates with openssl and managing environment variables for passphrases, adding steps compared to servers with built-in certificate management.
Requires Node.js and npm for installation, which can be a barrier in environments where Node is not standard or for users seeking minimal tooling.