Skip to content

Initial release.

Choose a tag to compare

@Pliexe Pliexe released this 20 Jan 21:26

Full Changelog: https://github.com/Pliexe/https-web-server-example/commits/0.1.0

Usage

To run the server, use the following command:

https-web-server-example [OPTIONS] [PATH]

Arguments

  • PATH: Directory to serve (default: current directory)

Options

  • --cert <CERT>: Path to SSL certificate (default certs/localhost.pem)
  • --key <KEY>: Path to SSL private key (default certs/localhost-key.pem)
  • -p, --port <PORT>: Set the port number (default: 8080)
  • -s, --ssl: Enable SSL and optionally set the port (default: 8443)
  • -h, --help: Display help information
  • -V, --version: Display version information

Examples

# Serve current directory on HTTP port 8080
https-web-server

# Serve specific directory on port 3000
https-web-server -p 3000 /path/to/directory

# Enable HTTPS with self-signed certificate
https-web-server -s

# Use custom SSL certificate
https-web-server -s --cert cert.pem --key key.pem