From 006e15ac5358551c90ef59357174ae19f2929115 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 3 Aug 2020 01:00:44 -0600 Subject: [PATCH] Mark as Mirror --- README.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a20f0c0..35243d4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +# Mirror of git.rootprojects.org/root/greenlock.js + +Github does not expose the ability to automatically update mirrors, +so this may lag behind the official repository which is found at: + +- + # New Documentation & [v4 Migration Guide](https://git.rootprojects.org/root/greenlock.js/src/branch/master/MIGRATION_GUIDE.md) We're still working on the full documentation for this new version, @@ -87,7 +94,7 @@ var greenlock = Greenlock.create({ packageAgent: pkg.name + '/' + pkg.version, maintainerEmail: pkg.author, staging: true, - notify: function(event, details) { + notify: function (event, details) { if ('error' === event) { // `details` is an error object in this case console.error(details); @@ -100,7 +107,7 @@ greenlock.manager agreeToTerms: true, subscriberEmail: 'webhosting@example.com' }) - .then(function(fullConfig) { + .then(function (fullConfig) { // ... }); ``` @@ -122,7 +129,7 @@ greenlock subject: altnames[0], altnames: altnames }) - .then(function() { + .then(function () { // saved config to db (or file system) }); ``` @@ -145,13 +152,13 @@ or wait for the renewal to complete (or for it to fail again). ```js greenlock .get({ servername: subject }) - .then(function(pems) { + .then(function (pems) { if (pems && pems.privkey && pems.cert && pems.chain) { console.info('Success'); } //console.log(pems); }) - .catch(function(e) { + .catch(function (e) { console.error('Big bad error:', e.code); console.error(e); }); @@ -300,7 +307,7 @@ of certificate requests. - [Store Callback Documentation](https://git.rootprojects.org/root/greenlock-store-test.js) ```js -return greenlock.get({ servername }).then(function(site) { +return greenlock.get({ servername }).then(function (site) { if (!site) { console.log(servername + ' was not found in any site config'); return; @@ -331,8 +338,8 @@ You are not required to call it. If you implement the `store` callbacks, the cer will automatically be saved (and if you don't implement them, they all get saved to disk). ```js -return greenlock.renew({}).then(function(results) { - results.forEach(function(site) { +return greenlock.renew({}).then(function (results) { + results.forEach(function (site) { if (site.error) { console.error(site.subject, site.error); return; @@ -368,7 +375,7 @@ If you are implementing your own `manager` callbacks, I recommend that you mark ```js gl.remove({ subject: 'example.com' -}).then(function(siteConfig) { +}).then(function (siteConfig) { // save the old site config elsewhere, just in case you need it again }); ```