This package has been deprecated

Author message:

Development continues at @small-tech/auto-encrypt-localhost (https://source.small-tech.org/site.js/lib/auto-encrypt-localhost).

@ind.ie/nodecert

3.2.0 • Public • Published

Nodecert

A Node.js wrapper for mkcert that:

  • Uses the 64-bit release binaries to support Linux, macOS, and Windows.

  • Automatically installs the certutil (nss) dependency on Linux on systems with apt, pacman, yum (untested) and and on macOS if you have Homebrew or MacPorts (untested).

  • Creates a root Certificate Authority

  • Creates locally-trusted TLS certificates for localhost, 127.0.0.1, and ::1

You can use these certificates for local development without triggering self-signed certificate errors.

It should just work™ 🤞

I’d appreciate it if you can help me test it on untested platforms and package managers 🤗

Nodecert is used in Site.js, a personal web tool for human beings (not startups or enterprises) that lets you develop, test, and deploy your secure static or dynamic personal web site with zero configuration.

For more details on how nodecert works behind the scenes, please see the mkcert README.

Installation

npm i -g @ind.ie/nodecert

Usage

Command-line interface

nodecert

Your certificates will be created in the ~/.small-tech.org/nodecert directory.

Caveats

Windows

Locally-trusted certificates do not work under Firefox. Please use Edge or Chrome on this platform. This is a mkcert limitation

API

require('@ind.ie/nodecert')()

As of version 3.1.1, you can now pass a custom directory for nodecert to use instead of the default (~/.small-tech.org/nodecert) and the created certificates will be stored there.

For example:

const os = require('os)
const path = require('path')
const nodecert = require('@ind.ie/nodecert')

const customDirectory = path.join(os.homedir(), '.my-app', 'tls', 'local')

nodecert(customDirectory)

Help wanted

  • Linux: certutil (nss) auto-installation has not been tested with yum.
  • macOS: certutil (nss) auto-installation has not been tested with MacPorts.

I can use your help in testing these out. Let me know if it works or blows up by opening an issue on the GitHub mirror. Pull requests are also welcome.

Thanks in advance! 🤓👍Aral

Readme

Keywords

none

Package Sidebar

Install

npm i @ind.ie/nodecert

Weekly Downloads

0

Version

3.2.0

License

AGPL-3.0-or-later

Unpacked Size

19.7 MB

Total Files

12

Last publish

Collaborators

  • aral