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

server-ssl

v50.0.2

Published

Node.js server that is SSL by default that can be used for development or production and can create and renew Lets Encrypt Certificates automatically using ACME, including wildcard certificates

Downloads

59

Readme

server-ssl

Node.js server that is SSL by default that can be used for development or production

Designed to get out of your way so you can still change anything

Creates and renews Lets Encrypt Certificates automatically using ACME

If you use CloudFlare you can get Wildcard Certificates

Getting Started

The easiest usage would be to serve a website:

  1. Clone or Download the main branch and extract it somewhere
  2. Put your website in the website folder
  3. Open the server-ssl folder in Command Prompt or Git Bash
  4. Run npm install
  5. Run node server-ssl
  6. View your website at https://localhost

You can also use different kinds of Lets Encrypt! certificates, see configuration below.

The default page/config is a simple API that serves and displays the time

Advanced/Production Usage

server-ssl has a configuration file called server-ssl.sc that contains all the options you can change

Default Configuration (server-ssl.sc)

portHttps          :: 443                                // The port number for HTTPS
portHttp           :: 80                                 // The port number for HTTP that will be redirected

certificate        :: "certificate.pem"                  // The path to the certificate file.
private-key        :: "private-key.pem"                  // The path to the private key for the certificate.

websiteRoot        :: "wwwroot"                          // The directory for the website files
entryPage          :: "index.html"                       // The page to use for the websites entry point 
errorRoot          :: "error"                            // The directory for error messages (404,500)

noCheckNodeVersion :: false                              // True to skip checking Node.js version

useLetsEncrypt     :: false                              // Use Lets Encrypt! to generate a certificate
domains            :: ["ssl.boats","www.ssl.boats"]      // Domains to generate the certificate for
generateCertAnyway :: false                              // True to generate before the recommended time
useStaging         :: false                              // True to use the staging server to avoid rate limits

useDnsProvider     :: false                              // Use the DNS-01 Challenge to generate certificate
providerName       :: "Cloud Flare"                      // Name of supported DNS Provider
providerToken      :: "apiTokenWithDnsEditPermission"    // API Token for DNS Provider
providerZone       :: ""                                 // ZoneId for DNS Provider, may found automatically.

Multiple Configuration Files

You can create multiple configuration files and choose which one to load as an argument.

node server-ssl --config="server-ssl-staging.sc"

If no argument is provided the default configuration file is loaded. (server-ssl.sc)

Generate Wild Card Certificates

You can generate Wild Card Certificates if you use a supported DNS-01 provider

At this present moment that is only Cloud Flare

Generate SAN Certificates

These certificates can have up to 50 sub-domains and no Wild Card

You can generate Lets Encrypt Certificates with the SAN Extension using the HTTP-01 challenge

This is the default configuration.

Always Redirects HTTP to HTTPS

HTTP requests from end users are always redirected to HTTPS

ACME Challenges transparently happen over HTTP to create/issue a new certificate

Default Layout

/root
│
├── /error
│   ├── 404.html
│   └── 500.html
│
├── /ssl
│   ├── /production
│   │   │
│   │   ├── ...
│   │   ├── private-key.pem
│   │   └── certificate.pem
│   │
│   ├── /staging
│   │   │
│   │   ├── ...
│   │   ├── private-key.pem
│   │   └── certificate.pem
│   │
│   └── state.js
│
├── /wwwroot
│   └── index.html <---- Your website goes here
│
├── server-ssl.sc
└── server-ssl.js

404/500 Pages

The server is configured to serve custom 404 and 500 error pages, instead of plain-text.

Currently everything is treated like a Server Error except for Not Found

These pages will automatically select light/dark mode