http-server
simple static file server
TLDR
Start server
$ http-server
Specify port$ http-server -p [8080]
Specify directory$ http-server [./public]
Enable CORS$ http-server --cors
Enable gzip$ http-server -g
SSL server$ http-server -S -C [cert.pem] -K [key.pem]
SYNOPSIS
http-server [options] [path]
DESCRIPTION
http-server is a simple static file server. It serves files from a directory over HTTP with no configuration required.
The tool is useful for development, testing, and quick file sharing. It supports SSL, CORS, and basic caching.
PARAMETERS
PATH
Directory to serve.-p, --port PORT
Port number (default 8080).-a ADDRESS
Listen address.-c SECONDS
Cache time.--cors
Enable CORS headers.-g, --gzip
Enable gzip.-S, --ssl
Enable SSL.--help
Display help information.
CAVEATS
Node.js package. Not for production. No authentication.
HISTORY
http-server is a popular npm package for quickly serving static files during development.
SEE ALSO
serve(1), python(1), live-server(1)
