npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

local-ssl-setup

v1.0.3

Published

Zero-config, native Node.js tool to generate trusted SSL certificates for local development (localhost HTTPS).

Readme

LocalSSL 🔒

npm version npm downloads License: MIT Node.js Version

LocalSSL is a zero-config, native Node.js command-line tool that enables you to use HTTPS in your local development environment (localhost) without any installation.

Features

  • 🚀 Fast: Generates certificates with a single command.
  • 📦 No Installation: No need to download external binaries (like mkcert).
  • 🛡️ Secure: Creates your own Certificate Authority (CA) and trusts it on your system.
  • ⚙️ Flexible: Use it via command-line arguments or interactive mode.
  • 🌐 IPv6 Support: Full support for IPv6 addresses (e.g., ::1).
  • 🧹 Cleanable: You can remove the CA certificate from the system with a single command.

⚡ Quick Start

# One-time setup (creates and trusts CA)
npx local-ssl-setup

# Generate certificates for your project
npx local-ssl-setup -d localhost,app.test -o ./certs

🖥️ Platform Support

  • Windows 10/11
  • macOS 10.15+
  • Linux (Ubuntu, CentOS, etc.)

Installation

Install globally to access it from anywhere:

npm install -g local-ssl-setup

Or run it instantly with npx without installing:

npx local-ssl-setup

Usage

1. Interactive Mode (Recommended)

If you run it without parameters, it will ask you step-by-step questions:

local-ssl-setup

2. Quick Mode

You can specify domains and output directory directly:

local-ssl-setup -d localhost,test.local --output ./certs

3. Uninstall

To remove the CA certificate from system trusted roots:

local-ssl-setup --uninstall

🛠️ Integration Examples

Vite

vite --https --key ./certs/localhost.key --cert ./certs/localhost.crt

Webpack Dev Server

// webpack.config.js
const fs = require("fs");

module.exports = {
  devServer: {
    https: {
      key: fs.readFileSync("./certs/localhost.key"),
      cert: fs.readFileSync("./certs/localhost.crt"),
    },
  },
};

Express.js

const https = require("https");
const fs = require("fs");

const options = {
  key: fs.readFileSync("./certs/localhost.key"),
  cert: fs.readFileSync("./certs/localhost.crt"),
};

https.createServer(options, app).listen(443);

Options

| Option | Alias | Description | | -------------- | ----- | ------------------------------------------------------------- | | --domains | -d | Comma separated list of domains (e.g., localhost,api.local) | | --output | -o | Directory to save certificates | | --validity | | Certificate validity in days. Default: 365 | | --install-ca | | Attempts to add the CA certificate to system trusted roots | | --uninstall | | Removes the CA certificate from the system | | --help | -h | Shows help message |

Configuration File (Optional)

You can persist your settings by creating a localssl.config.js file in your project root:

// localssl.config.js
module.exports = {
  domains: ["localhost", "my-app.local"],
  output: "./ssl",
};

❓ Troubleshooting

Certificate not trusted?

  • Run with admin/sudo privileges: sudo local-ssl-setup
  • Restart your browser after installation

Command not found?

  • Use npx: npx local-ssl-setup
  • Or install globally: npm install -g local-ssl-setup

Support

If you enjoy this theme and want to support its development, you can buy me a coffee! ☕

Your support helps me create more awesome themes and tools! 🙏