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

enable-https

v1.0.3

Published

This package enables HTTPS for your site following Kolia Odnosumov's preferred setup.

Downloads

16

Readme

Enable HTTPS for Your Site

This package simplifies the process of enabling HTTPS on your site by following a preferred setup. It uses Nginx as a reverse proxy with SSL support and integrates Docker for easy SSL certificate generation via Certbot.

Key Features

  • Adds necessary configuration files (nginx/app.conf, docker-compose.yml) to your project.
  • Generates a secure dhparam.pem file locally.
  • Creates SSL certificates inside a Docker container using Certbot.
  • Configures Nginx to automatically redirect all HTTP traffic to HTTPS.

How It Works

This package breaks the HTTPS setup process into two main steps:

1. Initial Setup

The package generates or updates the following files in your project:

  • docker-compose.yml
  • nginx/app.conf
  • dhparam.pem

You will need to run Docker Compose to finalize the initial setup and review the generated files.

2. Finalizing SSL Setup

After reviewing the configurations, the package will add SSL settings to nginx/app.conf. Finally, you will need to restart your services to apply the changes.

By default, the package only performs the initial setup so you can review the configuration before enabling SSL.

Installation

Ensure you have Node.js installed. Then, install the package globally:

npm install -g enable-https

Usage

Run the following command to start the HTTPS setup process:

enable-https

By default, this will:

  1. Generate necessary configuration files (docker-compose.yml, nginx/app.conf, dhparam.pem).
  2. Let you review the files before proceeding with SSL configuration.

Example Command

enable-https --domain example.com --email your-email@example.com --app-host myapp --app-port 4000

This command will generate SSL certificates for example.com and configure the app with the provided host and port.

Options

  • -d, --domain <domains...>: Specify the domains for SSL certificates (the first domain is the primary).
  • -e, --email <email>: Email address for Let's Encrypt notifications.
  • -h, --app-host <host>: Hostname of the application (default: "app").
  • -p, --app-port <port>: Application port (default: 3000).
  • -f, --files-dir <directory>: Directory for storing generated configuration files (default: "./enable-https-data").
  • --app-public-dir-or-volume [directory-or-volume]: Path to the public directory or volume (default: "app-public").
  • --no-dhparam: Skip generating the dhparam.pem file.
  • -2, --second-step: Perform the second step (append SSL settings and restart services).

Finalizing the Setup

After reviewing the generated files, you can complete the SSL setup by running:

enable-https --second-step --domain example.com --email your-email@example.com --app-host myapp --app-port 4000

This will update nginx/app.conf with the SSL configuration. You must restart your services for the changes to take effect.

License

This project is licensed under the MIT License.