show store and challenges

This commit is contained in:
AJ ONeal 2018-05-11 20:29:21 -06:00
parent 6c5813d86d
commit 53321d219a
2 changed files with 7 additions and 1 deletions

View File

@ -261,6 +261,8 @@ var lex = require('greenlock-express').create({
// Join the community to get notified of important updates and help me make greenlock better
, communityMember: true
, store: require('le-store-certbot').create({ webrootPath: '/tmp/acme-challenges' })
});
```
@ -268,12 +270,16 @@ The Automatic Certificate Issuance is initiated via SNI (`httpsOptions.SNICallba
For security, domain validation MUST have an approval callback in *production*.
```javascript
var http01 = require('le-challenge-fs').create({ webrootPath: '/tmp/acme-challenges' });
function approveDomains(opts, certs, cb) {
// This is where you check your database and associated
// email addresses with domains and agreements and such
// Opt-in to submit stats and get important updates
opts.communityMember = true;
opts.challenges = { 'http-01': http01 };
// The domains being approved for the first time are listed in opts.domains
// Certs being renewed are listed in certs.altnames
if (certs) {

2
lex.js
View File

@ -68,7 +68,7 @@ module.exports.create = function (opts) {
ports.forEach(function (p) {
if (!(parseInt(p, 10) >= 0)) { console.warn("'" + p + "' doesn't seem to be a valid port number for https"); }
promises.push(new PromiseA(function (resolve) {
var server = require('https').createServer(le.httpsOptions, le.middleware(le.app)).listen(p, function () {
var server = require('https').createServer(le.tlsOptions, le.middleware(le.app)).listen(p, function () {
console.log("Success! Serving https on port '" + p + "'");
resolve();
}).on('error', function (e) {