serve <location>
Static file serving and directory listing
Arguments
Name | Description |
---|
location | folders |
Options
Name | Description |
---|
-h, --help | Shows help message |
-v, --version | Displays 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, --debug | Show debugging information |
-s, --single | Rewrite all not-found requests to `index.html` |
-c, --config <path to config file> | Specify custom path to `serve.json` |
-C, --cors | Enable CORS, sets `Access-Control-Allow-Origin` to `*` |
-n, --no-clipboard | Do not copy the local address to the clipboard |
-u, --no-compression | Do not compress files |
--no-etag | Send `Last-Modified` header instead of `ETag` |
-S, --symlinks | Resolve 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-switching | Do not open a port other than the one specified when it's taken |