diff --git a/README.md b/README.md index d783609..b0ff070 100644 --- a/README.md +++ b/README.md @@ -253,7 +253,7 @@ var http = require('http'); var LeCore = deps.LeCore; -var httpsOptions = deps.httpsOptions; +var tlsOptions = deps.tlsOptions; var challengeStore = deps.challengeStore; var certStore = deps.certStore; @@ -278,7 +278,7 @@ function acmeResponder(req, res) { // // Server // -https.createServer(httpsOptions, acmeResponder).listen(5001, function () { +https.createServer(tlsOptions, acmeResponder).listen(5001, function () { console.log('Listening https on', this.address()); }); http.createServer(acmeResponder).listen(80, function () { diff --git a/example/letsencrypt.js b/example/letsencrypt.js index b187808..f018658 100644 --- a/example/letsencrypt.js +++ b/example/letsencrypt.js @@ -99,7 +99,7 @@ function runDemo() { closer(); }); - + } ); } @@ -112,7 +112,7 @@ function runDemo() { closer = serve.init({ LeCore: LeCore // needs a default key and cert chain, anything will do -, httpsOptions: require('localhost.daplie.com-certificates') +, tlsOptions: require('localhost.daplie.me-certificates') , challengeStore: challengeStore -, certStore: certStore +, certStore: certStore }); diff --git a/example/serve.js b/example/serve.js index 53faec4..1c430cd 100644 --- a/example/serve.js +++ b/example/serve.js @@ -15,7 +15,7 @@ module.exports.init = function (deps) { var LeCore = deps.LeCore; - var httpsOptions = deps.httpsOptions; + var tlsOptions = deps.tlsOptions || deps.httpsOptions; var challengeStore = deps.challengeStore; var certStore = deps.certStore; @@ -63,11 +63,11 @@ module.exports.init = function (deps) { // // Server // - httpsOptions.SNICallback = certGetter; - https.createServer(httpsOptions, acmeResponder).listen(443, function () { + tlsOptions.SNICallback = certGetter; + https.createServer(tlsOptions, acmeResponder).listen(443, function () { console.log('Listening https on', this.address()); }); - https.createServer(httpsOptions, acmeResponder).listen(5001, function () { + https.createServer(tlsOptions, acmeResponder).listen(5001, function () { console.log('Listening https on', this.address()); }); http.createServer(acmeResponder).listen(80, function () { @@ -77,6 +77,6 @@ module.exports.init = function (deps) { return function () { // Note: we should just keep a handle on // the servers and close them each with server.close() - process.exit(1); + process.exit(1); }; };