add communityMember option
This commit is contained in:
parent
24bbc24d90
commit
ab6635cd4d
50
README.md
50
README.md
|
@ -1,5 +1,8 @@
|
||||||
Greenlock™ for Express.js
|
Greenlock™ for Express.js
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
A high-level ACME client for Free SSL and Automated HTTPS.
|
||||||
|
|
||||||
| Sponsored by [ppl](https://ppl.family) |
|
| Sponsored by [ppl](https://ppl.family) |
|
||||||
[Greenlock™](https://git.coolaj86.com/coolaj86/greenlock.js) for
|
[Greenlock™](https://git.coolaj86.com/coolaj86/greenlock.js) for
|
||||||
[cli](https://git.coolaj86.com/coolaj86/greenlock-cli.js),
|
[cli](https://git.coolaj86.com/coolaj86/greenlock-cli.js),
|
||||||
|
@ -8,12 +11,24 @@ Greenlock™ for Express.js
|
||||||
[Koa](https://git.coolaj86.com/coolaj86/greenlock-koa.js),
|
[Koa](https://git.coolaj86.com/coolaj86/greenlock-koa.js),
|
||||||
[hapi](https://git.coolaj86.com/coolaj86/greenlock-hapi.js)
|
[hapi](https://git.coolaj86.com/coolaj86/greenlock-hapi.js)
|
||||||
|
|
||||||
Free SSL for node.js, now with **Let's Encrypt v2** and **wildcard** domain support)
|
Features
|
||||||
|
========
|
||||||
|
|
||||||
Fully automatic HTTPS with Express.js
|
- [x] Automatic HTTPS
|
||||||
(and all other middleware systems), including virtual hosting (vhost) support with multiple domains.
|
- [x] Free SSL
|
||||||
|
- [x] Free Wildcard SSL
|
||||||
Certificate renewals happen in the background between 10 and 14 days before expiration (~78 days).
|
- [x] Multiple domain support (up to 100 altnames per SAN)
|
||||||
|
- [x] Dynamic Virtual Hosting (vhost)
|
||||||
|
- [x] Automatical renewal (10 to 14 days before expiration)
|
||||||
|
- [x] Great ACME support
|
||||||
|
- [x] ACME draft 11
|
||||||
|
- [x] Let's Encrypt v2
|
||||||
|
- [x] Let's Encrypt v1
|
||||||
|
- [x] Full node.js support
|
||||||
|
- [x] core https module
|
||||||
|
- [x] Express.js
|
||||||
|
- [x] [Koa](https://git.coolaj86.com/coolaj86/greenlock-koa.js),
|
||||||
|
- [x] [hapi](https://git.coolaj86.com/coolaj86/greenlock-hapi.js)
|
||||||
|
|
||||||
Install
|
Install
|
||||||
=======
|
=======
|
||||||
|
@ -22,6 +37,22 @@ Install
|
||||||
npm install --save greenlock-express@2.x
|
npm install --save greenlock-express@2.x
|
||||||
```
|
```
|
||||||
|
|
||||||
|
become a `communityMember`
|
||||||
|
==================
|
||||||
|
|
||||||
|
If you're the kind of person that likes the kinds of stuff that I do,
|
||||||
|
well, I want to do more of it and I'd like to get you involved.
|
||||||
|
|
||||||
|
When you set the `communityMember` option to `true` I save your
|
||||||
|
email and I'm able to inform you when there are mandatory updates
|
||||||
|
(such as with Let's Encrypt v2), notify you of important security issues,
|
||||||
|
give you early access to similar projects, and
|
||||||
|
get your feedback from time to time.
|
||||||
|
|
||||||
|
I'll also get a hash of domain names that receive and renew certificates,
|
||||||
|
which is a metric that has long interested me and may help me in getting
|
||||||
|
non-developers involved in this and future projects.
|
||||||
|
|
||||||
QuickStart
|
QuickStart
|
||||||
==========
|
==========
|
||||||
<!--
|
<!--
|
||||||
|
@ -85,6 +116,9 @@ require('greenlock-express').create({
|
||||||
res.end('Hello, World!\n\n💚 🔒.js');
|
res.end('Hello, World!\n\n💚 🔒.js');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Join the community to get notified of important updates and help me make greenlock better
|
||||||
|
, communityMember: true
|
||||||
|
|
||||||
//, debug: true
|
//, debug: true
|
||||||
|
|
||||||
}).listen(80, 443);
|
}).listen(80, 443);
|
||||||
|
@ -187,6 +221,9 @@ var lex = require('greenlock-express').create({
|
||||||
//, sni: require('le-sni-auto').create({})
|
//, sni: require('le-sni-auto').create({})
|
||||||
|
|
||||||
, approveDomains: approveDomains
|
, approveDomains: approveDomains
|
||||||
|
|
||||||
|
// Join the community to get notified of important updates and help me make greenlock better
|
||||||
|
, communityMember: true
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -198,6 +235,7 @@ function approveDomains(opts, certs, cb) {
|
||||||
// This is where you check your database and associated
|
// This is where you check your database and associated
|
||||||
// email addresses with domains and agreements and such
|
// email addresses with domains and agreements and such
|
||||||
|
|
||||||
|
opts.communityMember = true;
|
||||||
|
|
||||||
// The domains being approved for the first time are listed in opts.domains
|
// The domains being approved for the first time are listed in opts.domains
|
||||||
// Certs being renewed are listed in certs.altnames
|
// Certs being renewed are listed in certs.altnames
|
||||||
|
@ -275,4 +313,4 @@ Brief overview of some simple options for `greenlock.js`:
|
||||||
* Let's Encrypt v2 (aka v02 or ACME draft 11)
|
* Let's Encrypt v2 (aka v02 or ACME draft 11)
|
||||||
* ACME draft 11 (ACME v2 is a misnomer)
|
* ACME draft 11 (ACME v2 is a misnomer)
|
||||||
* Wildcard domains!! (via dns-01 challenges)
|
* Wildcard domains!! (via dns-01 challenges)
|
||||||
* `*.example.com`
|
* `*.example.com`
|
||||||
|
|
|
@ -18,5 +18,7 @@ require('../').create({
|
||||||
, renewWithin: (91 * 24 * 60 * 60 * 1000)
|
, renewWithin: (91 * 24 * 60 * 60 * 1000)
|
||||||
, renewBy: (90 * 24 * 60 * 60 * 1000)
|
, renewBy: (90 * 24 * 60 * 60 * 1000)
|
||||||
|
|
||||||
|
// Get notified of important updates and help me make greenlock better
|
||||||
|
, communityMember: true
|
||||||
, debug: true
|
, debug: true
|
||||||
}).listen(80, 443);
|
}).listen(80, 443);
|
||||||
|
|
|
@ -25,13 +25,13 @@ require('../').create({
|
||||||
, server: 'https://acme-staging-v02.api.letsencrypt.org/directory' // staging
|
, server: 'https://acme-staging-v02.api.letsencrypt.org/directory' // staging
|
||||||
|
|
||||||
// The previous 'simple' example set these values statically,
|
// The previous 'simple' example set these values statically,
|
||||||
// but this example uses approveDomains() to set them dynamically
|
// but this example uses approveDomains() to set them dynamically
|
||||||
//, email: 'none@see.note.above'
|
//, email: 'none@see.note.above'
|
||||||
//, agreeTos: false
|
//, agreeTos: false
|
||||||
|
|
||||||
// approveDomains is the right place to check a database for
|
// approveDomains is the right place to check a database for
|
||||||
// email addresses with domains and agreements and such
|
// email addresses with domains and agreements and such
|
||||||
, approveDomains: approveDomains
|
, approveDomains: approveDomains
|
||||||
|
|
||||||
// You MUST have access to write to directory where certs are saved
|
// You MUST have access to write to directory where certs are saved
|
||||||
// ex: /etc/greenlock/
|
// ex: /etc/greenlock/
|
||||||
|
@ -39,6 +39,9 @@ require('../').create({
|
||||||
|
|
||||||
, app: app
|
, app: app
|
||||||
|
|
||||||
|
// Get notified of important updates and help me make greenlock better
|
||||||
|
, communityMember: true
|
||||||
|
|
||||||
//, debug: true
|
//, debug: true
|
||||||
|
|
||||||
}).listen(80, 443);
|
}).listen(80, 443);
|
||||||
|
@ -47,7 +50,7 @@ require('../').create({
|
||||||
//
|
//
|
||||||
// My Secure Database Check
|
// My Secure Database Check
|
||||||
//
|
//
|
||||||
function approveDomains(opts, certs, cb) {
|
function approveDomains(opts, certs, cb) {
|
||||||
|
|
||||||
// The domains being approved for the first time are listed in opts.domains
|
// The domains being approved for the first time are listed in opts.domains
|
||||||
// Certs being renewed are listed in certs.altnames
|
// Certs being renewed are listed in certs.altnames
|
||||||
|
|
|
@ -28,6 +28,8 @@ require('../').create({
|
||||||
, approveDomains: domains
|
, approveDomains: domains
|
||||||
, configDir: require('path').join(require('os').homedir(), 'acme', 'etc')
|
, configDir: require('path').join(require('os').homedir(), 'acme', 'etc')
|
||||||
, app: remoteAccess(secret)
|
, app: remoteAccess(secret)
|
||||||
|
// Get notified of important updates and help me make greenlock better
|
||||||
|
, communityMember: true
|
||||||
//, debug: true
|
//, debug: true
|
||||||
}).listen(3000, 8443);
|
}).listen(3000, 8443);
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,9 @@ require('../').create({
|
||||||
res.end('Hello, World!\n\n💚 🔒.js');
|
res.end('Hello, World!\n\n💚 🔒.js');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Get notified of important updates and help me make greenlock better
|
||||||
|
, communityMember: true
|
||||||
|
|
||||||
//, debug: true
|
//, debug: true
|
||||||
|
|
||||||
}).listen(80, 443);
|
}).listen(80, 443);
|
||||||
|
|
|
@ -30,7 +30,7 @@ require('../').create({
|
||||||
|
|
||||||
|
|
||||||
// The domains being approved for the first time are listed in opts.domains
|
// The domains being approved for the first time are listed in opts.domains
|
||||||
|
|
||||||
// Certs being renewed are listed in certs.altnames
|
// Certs being renewed are listed in certs.altnames
|
||||||
if (certs) {
|
if (certs) {
|
||||||
opts.domains = certs.altnames;
|
opts.domains = certs.altnames;
|
||||||
|
@ -83,13 +83,10 @@ require('../').create({
|
||||||
var serve = serveStatic(path.join(srv, hostname), { redirect: true });
|
var serve = serveStatic(path.join(srv, hostname), { redirect: true });
|
||||||
serve(req, res, finalhandler(req, res));
|
serve(req, res, finalhandler(req, res));
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
require('express')().use('/', function (req, res) {
|
// Get notified of important updates and help me make greenlock better
|
||||||
res.setHeader('Content-Type', 'text/html; charset=utf-8')
|
, communityMember: true
|
||||||
res.end('Hello, World!\n\n💚 🔒.js');
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
|
|
||||||
//, debug: true
|
//, debug: true
|
||||||
|
|
||||||
}).listen(80, 443);
|
}).listen(80, 443);
|
||||||
|
|
11
package.json
11
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "greenlock-express",
|
"name": "greenlock-express",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.",
|
"description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.",
|
||||||
"main": "lex.js",
|
"main": "lex.js",
|
||||||
"homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js",
|
"homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js",
|
||||||
|
@ -12,16 +12,17 @@
|
||||||
"le-challenge-fs": "^2.0.8",
|
"le-challenge-fs": "^2.0.8",
|
||||||
"le-sni-auto": "^2.1.4",
|
"le-sni-auto": "^2.1.4",
|
||||||
"le-store-certbot": "^2.0.5",
|
"le-store-certbot": "^2.0.5",
|
||||||
"localhost.daplie.me-certificates": "^1.2.3",
|
"redirect-https": "^1.1.5",
|
||||||
"redirect-https": "^1.1.5"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"express": "^4.16.3",
|
"express": "^4.16.3",
|
||||||
"express-basic-auth": "^1.1.5",
|
"express-basic-auth": "^1.1.5",
|
||||||
"serve-index": "^1.9.1"
|
"finalhandler": "^1.1.1",
|
||||||
|
"serve-index": "^1.9.1",
|
||||||
|
"serve-static": "^1.13.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node examples/serve.js"
|
"test": "node examples/simple.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in New Issue