This package (`live-server-https`) provides `tls.createServer` options, including a pre-generated SSL/TLS certificate, to enable HTTPS for local development servers, primarily with `live-server`. It aims to simplify the setup of HTTPS on localhost without manual certificate generation. The current version is 0.0.2. Given its low version number and lack of updates on its GitHub repository since November 2022, its release cadence is non-existent, and it appears to be an abandoned project. Its key differentiator is providing a plug-and-play certificate for `tls.createServer`, specifically designed for integration with `live-server`'s `--https` flag, which expects a module path. However, the pre-generated certificate is not from a trusted authority, leading to browser warnings.
npm install live-server-httpsVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic use of the `live-server-https` options object with Node.js's `tls.createServer` to start an HTTPS server, and illustrates the command-line usage with `live-server`.
This is a security feature, not a bug. For development, accept the browser warning. For production, use a trusted CA-issued certificate.
Consider using alternative, actively maintained solutions for HTTPS development servers like `http-server` with custom certificates, or the built-in HTTPS options of `live-server` if updated, which allows specifying `cert` and `key` files.
For production or shared development environments, always generate your own unique SSL/TLS certificates using tools like OpenSSL or obtain them from a trusted Certificate Authority.
Locate the correct global path by running `npm -g ls live-server-https` and then construct the full path for the `--https` flag, e.g., `live-server --https=$(npm root -g)/live-server-https` or `live-server --https=./node_modules/live-server-https` if installed locally.
Click 'Advanced' or 'Proceed to unsafe/untrusted site' in your browser to bypass the warning for local development. This is expected behavior for self-signed certificates.