fix examples in docs

This commit is contained in:
AJ ONeal 2016-08-09 16:12:16 -04:00
parent 6314a53a4a
commit b33b47407f
1 changed files with 5 additions and 6 deletions

View File

@ -131,13 +131,13 @@ le = LE.create({
// If using express you should use the middleware // If using express you should use the middleware
// app.use('/', le.middleware()); // app.use('/', le.middleware());
// //
// Otherwise you should use the wrapped getChallenge: // Otherwise you should see the test file for usage of this:
// le.getChallenge(domain, key, val, done) // le.challenge.get(opts.domain, key, val, done)
// Check in-memory cache of certificates for the named domain // Check in-memory cache of certificates for the named domain
le.check({ domain: 'example.com' }).then(function (results) { le.check({ domains: [ 'example.com' ] }).then(function (results) {
if (results) { if (results) {
// we already have certificates // we already have certificates
return; return;
@ -145,7 +145,7 @@ le.check({ domain: 'example.com' }).then(function (results) {
// Register Certificate manually // Register Certificate manually
le.get({ le.register({
domains: ['example.com'] // CHANGE TO YOUR DOMAIN (list for SANS) domains: ['example.com'] // CHANGE TO YOUR DOMAIN (list for SANS)
, email: 'user@email.com' // CHANGE TO YOUR EMAIL , email: 'user@email.com' // CHANGE TO YOUR EMAIL
@ -160,7 +160,7 @@ le.check({ domain: 'example.com' }).then(function (results) {
}, function (err) { }, function (err) {
// Note: you must either use le.middleware() with express, // Note: you must either use le.middleware() with express,
// manually use le.getChallenge(domain, key, val, done) // manually use le.challenge.get(opts, domain, key, val, done)
// or have a webserver running and responding // or have a webserver running and responding
// to /.well-known/acme-challenge at `webrootPath` // to /.well-known/acme-challenge at `webrootPath`
console.error('[Error]: node-letsencrypt/examples/standalone'); console.error('[Error]: node-letsencrypt/examples/standalone');
@ -190,7 +190,6 @@ The full end-user API is exposed in the example above and includes all relevant
``` ```
le.register le.register
le.get // checkAndRegister
le.check le.check
``` ```