Browse Source

Allow passing commonName in as string

pull/2/head
Luke Childs 7 years ago
parent
commit
f8293fcd83
  1. 2
      src/index.js

2
src/index.js

@ -7,7 +7,7 @@ const createCert = opts => {
opts = Object.assign({
days: 365,
commonName: 'example.com'
}, opts);
}, typeof opts === 'string' ? { commonName: opts } : opts);
return pify(pem.createCertificate)({
days: opts.days,

Loading…
Cancel
Save