http-server
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
basic-auth | 2.0.1 | 3.66 kB | MIT | prod | |
chalk | 4.1.2 | 11.31 kB | MIT | prod | |
corser | 2.0.1 | 5.73 kB | MIT | prod | |
he | 1.2.0 | 39.33 kB | MIT | prod | |
html-encoding-sniffer | 3.0.0 | 3.75 kB | MIT | prod | |
http-proxy | 1.18.1 | 66.74 kB | MIT | prod | |
mime | 1.6.0 | 15.32 kB | MIT | prod | |
minimist | 1.2.8 | 15.16 kB | MIT | prod | |
opener | 1.5.2 | 3 kB | (WTFPL OR MIT) | prod | |
portfinder | 1.0.32 | 6.38 kB | MIT | prod | |
secure-compare | 3.0.1 | 1.11 kB | MIT | prod | |
union | 0.5.0 | 24.67 kB | UNKNOWN | prod | 1 |
url-join | 4.0.1 | 5.64 kB | MIT | prod |
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.