make-cert

Quickly generate a self-signed cert to start an HTTPS server

Usage no npm install needed!

<script type="module">
  import makeCert from 'https://cdn.skypack.dev/make-cert';
</script>

README

make-cert

npm CI Status dependencies Status devDependencies Status

Quickly generate a self-signed cert to start an HTTPS server

Usage

Install make-cert by running:

yarn add make-cert

To generate a key.pem with the private key and cert.pem with the certificate, both in PEM format, run:

yarn make-cert localhost

To use this in your own JavaScript code:

import makeCert from 'make-cert'

const {key, cert} = makeCert('localhost')
console.log(key)
console.log(cert)