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

@pat/sslocal

v0.3.0

Published

Make local environment SSL as streamlined as possible.

Downloads

18

Readme

SSLocal

SSLocal helps to make running SSL in your local Webpack development environment as streamlined as possible.

Please do not use this package in production environments - it's only meant for local development.

Installation

  1. Install mkcert
  2. Add config/certificates to your application's .gitignore file.
  3. Add this package to your application's package.json - ideally just for the development environment.
"devDependencies": {
  // ...
  "@pat/sslocal": "~0.3",
  // ...
}
  1. If you're using Webpacker and a Rails application, edit config/webpack/development.js to apply SSLocal's logic:
// replace
const environment = require('./environment')

// with
const sslocal = require('@pat/sslocal')
const environment = sslocal.apply(require('./environment'))
// or, if you're using webpack-dev-server v4+
const environment = sslocal.apply(require('./environment'), 4)
  1. Otherwise, use the same approach wherever else you're generating your Webpack configuration. (If you have ideas on how to improve this, please do get in touch!)

Usage

  1. Ensure the config/certificates folder exists (mkdir -p config/certificates).
  2. Generate the local certificate via mkcert:
mkcert --cert-file config/certificates/development.crt \
  --key-file config/certificates/development.key \
  localhost 127.0.0.1
  1. Boot your Webpack dev server, and it should automatically use SSL using the generated certificate files.

If you're using SSLocal with a Rails app and Webpacker, you'll almost certainly want to install and set up the SSLocal library for Ruby as well to keep matching protocols.

If you want to switch back to HTTP, just delete the certificate files and restart your Webpack server. The certificate files are not precious, and can be deleted/regenerated as much as you like.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pat/sslocal-js. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

My knowledge of Webpack is limited, so please do get in touch if you're more familiar with these tools and have ideas on how this project can be improved! Perhaps there's a way to make the application of SSL settings automatic via a Webpack plugin?

License

The package is copyright Pat Allan, 2020, and is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in SSLocal's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.