letsencrypt-express wrapper
npm install andrao-httpsandrao-https
==============
Letsencrypt SSL certificate renewal + http / https server initialization. letsencrypt-express wrapper.
``sh`
npm install --save andrao-https
`javascript`
var servers = require('andrao-https')(app, {
domains: ['github.com', 'www.github.com']
, email: 'user@example.com'
});
servers object contains native Node http and https listening at specified ports (default 80 for HTTP, 443 for HTTPS):
`javascript`
servers = {
http: [server@80]
https: [server@443]
}
Key | Description | Default
--- | --- | ---
domains | Certificate domains | [] | Certificate email address | 'me@example.com'testing | Use staging server URL (for development) | falsehttp_ports | HTTP server port(s) | [80]https_ports | HTTPS server port(s) | [443]redirect | Automatic HTTP -> HTTPS redirect | true
`sh`
npm install -g letsencrypt-cli
For best results obtain cerificates individually for multiple domains, i.e. once for example.com, and once for www.example.com.
`sh``
sudo letsencrypt certonly \
--agree-tos true --debug true --duplicate true \
--config-dir ~/letsencrypt/etc \
--email me@example.com \
--domains example.com \
--tls-sni-01-port HTTPS_PORT \
--http-01-port HTTP_PORT