2
0
mirror of https://github.com/therootcompany/greenlock.js.git synced 2025-03-06 08:40:41 +00:00

fix non-promise example

This commit is contained in:
AJ ONeal 2016-08-09 18:56:46 -06:00 committed by GitHub
parent db50cb8782
commit 1e2bf80b5d

View File

@ -61,12 +61,11 @@ of how to use this library:
```javascript
var le = require('letsencrypt').create({ server: 'staging' });
le.register(
{ domains: ['example.com'], email: 'user@email.com', agreeTos: true }
, function (err, results) {
console.log(err, results);
}
);
le.register({ domains: ['example.com'], email: 'user@email.com', agreeTos: true }).then(function (results) {
console.log(results);
}, function (err) {
console.error(err);
});
```
You also need some sort of server to handle the acme challenge: