`create-cert` is a convenient wrapper around the [`pem`](https://github.com/Dexus/pem) module. It generates a self signed certificate with sensible defaults along with an associated CA certificate to validate against. It has a Promise based API and returns the keys in a format that can be passed directly into `https.createServer`.
For strict SSL usage you can set the common name for the certificate and validate it against the CA certificate. An example using the [Got](https://github.com/sindresorhus/got) request client:
If a string is passed in, it will be used as the `commonName`. You can pass in any valid option for [`pem.createCertificate()`](https://github.com/Dexus/pem#create-a-certificate) to override the defaults.