http-server
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.The http-server is a simple, zero-configuration command-line static HTTP server. It's easy to use and hackable for testing, local development, and learning even while powerful enough for production usage.
The http-server can be installed and used in several ways. To run it on-demand, the npx
tool can be used as follows:
npx http-server [path] [options]
If you want to install it globally via npm, use this command:
npm install --global http-server
You can also install it using Homebrew:
brew install http-server
Or add it as a dependency to your npm package with:
npm install http-server
After installing, usage of the http-server is kept simple. The general command is http-server [path] [options]
. The [path]
is optional and will default to ./public
if the directory exists, otherwise, it will be ./
. When the server is up and running, you can visit http://localhost:8080 to view your server.
The full documentation, including all available options for using the http-server, can be found in the readme on the http-server's GitHub repository at git://github.com/http-party/http-server.git. The documentation outlines all available setup options, features (like magic files and TLS/SSL setup), and development guidelines.