http-server
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
colors | 1.0.3 | 87.07 kB | MIT | prod | |
corser | 2.0.1 | 5.73 kB | MIT | prod | |
ecstatic | 3.3.2 | 249.77 kB | MIT | prod | 1 1 |
http-proxy | 1.18.1 | 66.74 kB | MIT | prod | |
opener | 1.4.3 | 2.84 kB | (WTFPL OR MIT) | prod | |
optimist | 0.6.1 | 12.06 kB | MIT/X11 | prod | 1 1 1 1 |
portfinder | 1.0.32 | 6.38 kB | MIT | prod | |
union | 0.5.0 | 24.67 kB | UNKNOWN | prod | 1 |
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.