From 103e4ae419699f8e1d95cbc53c13bcf27ba488e1 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 17 Aug 2016 09:11:10 -0600 Subject: [PATCH] Update README.md --- README.md | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 107d950..e872aa4 100644 --- a/README.md +++ b/README.md @@ -115,26 +115,30 @@ var lex = require('letsencrypt-express').create({ //, store: require('le-store-certbot').create({}) //, sni: require('le-sni-auto').create({}) -, approveDomains: function (opts, certs, cb) { - // This is where you check your database and associated - // email addresses with domains and agreements and such - - - // The domains being approved for the first time are listed in opts.domains - // Certs being renewed are listed in certs.altnames - if (certs) { - opts.domains = certs.altnames; - } - else { - opts.email = 'john.doe@example.com'; - opts.agreeTos = true; - } - - cb(null, { options: opts, certs: certs }); - } +, approveDomains: approveDomains }); ``` +```javascript +function approveDomains(opts, certs, cb) { + // This is where you check your database and associated + // email addresses with domains and agreements and such + + + // The domains being approved for the first time are listed in opts.domains + // Certs being renewed are listed in certs.altnames + if (certs) { + opts.domains = certs.altnames; + } + else { + opts.email = 'john.doe@example.com'; + opts.agreeTos = true; + } + + cb(null, { options: opts, certs: certs }); +} +``` + ```javascript // handles acme-challenge and redirects to https