1.0.0 • Published 7 years ago

andrao-https v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

andrao-https

Letsencrypt SSL certificate renewal + http / https server initialization. letsencrypt-express wrapper.

Installation

npm install --save andrao-https

Usage

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):

servers = {
    http:  [server@80]
    https: [server@443]
}

Options

KeyDescriptionDefault
domainsCertificate domains[]
emailCertificate email address'me@example.com'
testingUse staging server URL (for development)false
http_portsHTTP server port(s)[80]
https_portsHTTPS server port(s)[443]
redirectAutomatic HTTP -> HTTPS redirecttrue

Obtaining an SSL certificate via letsencrypt-cli

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.

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
1.0.0

7 years ago

0.3.0

7 years ago

0.1.9

9 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago