From 53321d219a7884be443b375b28377ced3e5a0f95 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 11 May 2018 20:29:21 -0600 Subject: [PATCH] show store and challenges --- README.md | 6 ++++++ lex.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9743058..083feff 100644 --- a/README.md +++ b/README.md @@ -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) { diff --git a/lex.js b/lex.js index 751e2dc..d3211e9 100644 --- a/lex.js +++ b/lex.js @@ -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) {