2.0.3 • Published 5 years ago

lets-encrypt-certificate-manager v2.0.3

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
5 years ago

lets-encrypt-certificate-manager

dont use this package on production server

Build Status

Lets Encrypt certificate manager encapsulates Greenlock and does auto renew Let's Encrypt certificates.

// create and manage certificate for a domain
const https = require('https');
const CertificateManager = require('lets-encrypt-certificate-manager');

CertificateManager.domain = 'www.example.com';
CertificateManager.email = 'admin@example.com';
CertificateManager.httpToHttpsRedirectEnabled = true; // redirects all traffic from http to https 
CertificateManager.ip = '12.123.123.21';
//CertificateManager.version = 'draft-12'; // default is 'draft-12'
//CertificateManager.isProduction = true; // default is true
//CertificateManager.renewCertWithin = 60 * 24 * 60 * 60 * 1000; // default is 60 * 24 * 60 * 60 * 1000
//CertificateManager.renewCertBy = 30 * 24 * 60 * 60 * 1000; // default is 30 * 24 * 60 * 60 * 1000
//CertificateManager.debugEnabled = true; // default is true
var greenlock = CertificateManager.greenlockInit();

https.createServer(greenlock.httpsOptions, (req, res) => {
  res.writeHead(200);
  res.end('hello world\n');
}).listen(8000);
2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.0

5 years ago