From 9cdd92e3c39b517924078e5b0db8d3f1075ca450 Mon Sep 17 00:00:00 2001 From: Axel Navarro Date: Tue, 9 Nov 2021 06:59:11 -0300 Subject: [PATCH] http-server: add page (#7200) --- pages/common/http-server.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages/common/http-server.md diff --git a/pages/common/http-server.md b/pages/common/http-server.md new file mode 100644 index 000000000..dad191726 --- /dev/null +++ b/pages/common/http-server.md @@ -0,0 +1,36 @@ +# http-server + +> Simple static HTTP server to serve static files. +> More information: . + +- Start an HTTP server listening on the default port to serve the current directory: + +`http-server` + +- Start an HTTP server on a specific port to serve a specific directory: + +`http-server {{path/to/directory}} --port {{port}}` + +- Start an HTTP server using basic authentication: + +`http-server --username {{username}} --password {{password}}` + +- Start an HTTP server with directory listings disabled: + +`http-server -d {{false}}` + +- Start an HTTPS server on the default port using the specified certificate: + +`http-server --ssl --cert {{path/to/cert.pem}} --key {{path/to/key.pem}}` + +- Start an HTTP server and include the client's IP address in the output logging: + +`http-server --log-ip` + +- Start an HTTP server with CORS enabled by including the `Access-Control-Allow-Origin: *` header in all responses: + +`http-server --cors` + +- Start an HTTP server with logging disabled: + +`http-server --silent`