@ramlmn/serv
v0.8.0
Published
Static file server with https and http2
Downloads
8
Readme
serv
Static file server with https, http2 (recommened only for development)
Installation
$ npm install --global @ramlmn/serv
Usage
serv - Static file server with https and http2
Usage
Serve current directory
$ serv
Listen on port 8080 with compression
$ serv --port 8080 --compress -d ./site/
Listen over https with directory listing (uses self-signed certificates)
$ serv --self-signed --listing
Use specific SSL certificate and private key
$ serv --ssl-cert ./cred.cert --ssl-key ./cred.key
Options
-h, --help Shows this help text
-p, --port Port to listen on (default $PORT or 5000)
-d, --dir Path to directory
-l, --listing Enable directory listing
-c, --compress Enables compression (gzip)
-s, --ssl Use self-signed certificates (enables TLS/SSL)
--ssl-cert Path to SSL certificate file (enables TLS/SSL)
--ssl-key Path to SSL private key file (enables TLS/SSL)
--http2 Use http2 (enables TLS/SSL)
Note: Currently no browser supports http2 without TLS, --http2
currently is
worthy only when TLS/SSL is enabled
(ref)