0.0.3 • Published 5 years ago
express-serve v0.0.3
Express Serve
A simple command-line tool to serve static content and proxy APIs.
This module has been heavily influenced by http-server.
Usage
Usage: express-serve [--static | --proxy] <options>
Options:
-V, --version output the version number
-p, --port <int> Port to use (default: 8080)
-s, --ssl [bool] Enable https (default: false)
-c, --cert <string> Path to ssl cert file (default: "cert.pem")
-k, --key <string> Path to ssl key file (default: "key.pem")
-S, --static [bool] Serve static files (default: false)
-d, --static.dir <string> Relative directory (default: "public")
-g, --static.path <s> static express style path (default: "/")
-f, --static.fallback <string> Fallback page (default: "404.html")
-x, --static.options <json> express.static options (default: {})
-P, --proxy [bool] Proxy requests (default: false)
-u, --proxy.url <s> proxy url (default: "http://localhost:3000")
-q, --proxy.path <s> proxy express style path (default: "/api/*")
-y, --proxy.options <json> http-proxy options (default: {})
-h, --help output usage information
--static.options
can be found at serve-static.--proxy.options
can be found at http-proxy.