Subcommands (1)
Options (5)
-p, --portbooleanStart an HTTP server on a specific port to serve a specific directory
http-server {{path/to/directory}} {{[-p|--port]}} {{port}}-S, --sslbooleanStart an HTTPS server on the default port using the specified certificate
http-server {{[-S|--ssl]}} {{[-C|--cert]}} {{path/to/cert.pem}} {{[-K|--key]}} {{path/to/key.pem}}-C, --certbooleanStart an HTTPS server on the default port using the specified certificate
http-server {{[-S|--ssl]}} {{[-C|--cert]}} {{path/to/cert.pem}} {{[-K|--key]}} {{path/to/key.pem}}-K, --keybooleanStart an HTTPS server on the default port using the specified certificate
http-server {{[-S|--ssl]}} {{[-C|--cert]}} {{path/to/cert.pem}} {{[-K|--key]}} {{path/to/key.pem}}-s, --silentbooleanStart an HTTP server with logging disabled
http-server {{[-s|--silent]}}Examples (8)
Start an HTTP server listening on the default port to serve the current directory
Start an HTTP server on a specific port to serve a specific directory
http-server path/to/directory [-p|--port] portStart an HTTP server using basic authentication
http-server --username username --password passwordStart an HTTP server with directory listings disabled
http-server -d falseStart an HTTPS server on the default port using the specified certificate
http-server [-S|--ssl] [-C|--cert] path/to/cert.pem [-K|--key] path/to/key.pemStart an HTTP server and include the client's IP address in the output logging
http-server --log-ipStart an HTTP server with CORS enabled by including the `Access-Control-Allow-Origin: *` header in all responses
http-server --corsStart an HTTP server with logging disabled
http-server [-s|--silent]