1.0.0 • Published 8 years ago
pem-promise v1.0.0
pem-promise
Wraps pem in a promise compatible API.
Installation
$ npm install --save pem-promise
Usage
const pem = require('pem-promise')
const https = require('https')
pem.createCertificate({
days: 1,
selfSigned: true
})
.then((keys) => {
https.createServer({key: keys.serviceKey, cert: keys.certificate}, function(req, res) {
res.end('o hai!')
}).listen(443)
})
.catch((error) => {
console.error(`Could not create certificate because ${error}`)
})
All pem methods are wrapped. See the pem documentation for full details of the API.
1.0.0
8 years ago