serve <location>

Static file serving and directory listing

Arguments

NameDescription
locationfolders

Options

NameDescription
-h, --helpShows help message
-v, --versionDisplays the current version of serve
-l, --listen <listen_uri>Specify a URI endpoint on which to listen - more than one may be specified to listen in multiple places
-p <port>Specify custom port
-d, --debugShow debugging information
-s, --singleRewrite all not-found requests to `index.html`
-c, --config <path to config file>Specify custom path to `serve.json`
-C, --corsEnable CORS, sets `Access-Control-Allow-Origin` to `*`
-n, --no-clipboardDo not copy the local address to the clipboard
-u, --no-compressionDo not compress files
--no-etagSend `Last-Modified` header instead of `ETag`
-S, --symlinksResolve symlinks instead of showing 404 errors
--ssl-cert <path to SSL/TLS certificate>Optional path to an SSL/TLS certificate to serve with HTTPS
--ssl-key <path to private key>Optional path to the SSL/TLS certificate's private key
--ssl-pass <path to passphrase>Optional path to the SSL/TLS certificate's passphrase
--no-port-switchingDo not open a port other than the one specified when it's taken