Registry / http-networking / live-server-https

live-server-https

JSON →
library0.0.2jsnpmunverified

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-https
INSTALL
IMPORT
SIG · LIVE-SERVER-HTTPS
L
live-server-https
http-networkingjavascriptv0.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

https
import https from 'live-server-https';
const https = require('live-server-https')
The package exports a simple options object for `tls.createServer`. The `require` syntax is shown in the README, but ESM `import` is the modern approach.
createServer
import { createServer } from 'tls';
const tls = require('tls'); const createServer = tls.createServer;
This is a Node.js built-in module. While the `require('tls')` pattern is used in the example, direct named import is also valid in ESM contexts for built-in modules.

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`.

const tls = require('tls'); const httpsOptions = require('live-server-https'); const server = tls.createServer(httpsOptions, (socket) => { console.log('server connected', socket.authorized ? 'authorized' : 'unauthorized'); socket.write('welcome!\n'); socket.setEncoding('utf8'); socket.pipe(socket); }); server.listen(8000, () => { console.log('HTTPS server bound on port 8000'); }); // Example of how to use with live-server from CLI (after global install): // live-server --https=/usr/local/lib/node_modules/live-server-https --port=8080 // (adjust path based on your global npm installation)
Debug
Known issues
gotchaWhen accessing the HTTPS server in a browser, a 'certificate not from a trusted authority' warning will appear. This is expected as the certificate is self-signed and not issued by a recognized Certificate Authority. Users must manually 'unsafely proceed' or add an exception.
fix
This is a security feature, not a bug. For development, accept the browser warning. For production, use a trusted CA-issued certificate.
affects: >=0.0.1
breakingThe `live-server-https` package appears to be abandoned, with no new releases or code contributions since November 2022 and a very early version number (0.0.2). This means it will not receive updates for security vulnerabilities, bug fixes, or compatibility with newer Node.js versions or `live-server` releases. Relying on this package for any critical development is risky.
fix
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.
affects: >=0.0.2
gotchaThe pre-generated certificate included with this package is valid until the year 3017. While this is an extremely long validity period, in real-world scenarios, using pre-generated or self-signed certificates for anything beyond simple local development is a security risk due to potential key exposure or lack of trust.
fix
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.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'live-server-https' or similar path errors when using live-server --https
The `--https` flag for `live-server` expects a path to the module, and the exact global installation path can vary between npm versions or operating systems.
fix
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.
Browser displaying 'Your connection is not private' or 'NET::ERR_CERT_AUTHORITY_INVALID'
The certificate provided by `live-server-https` is self-signed and not issued by a trusted Certificate Authority, which causes browsers to warn users about potential security risks.
fix
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.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
live-serveroptionalThis package is designed to provide HTTPS options specifically for the `live-server` development server. While not a direct `package.json` dependency, it's the primary intended use case for its functionality.
Agent activity
4 hits · last 30 days
node
4
Resources
live-server-https — npm install live-server-https · libregistry