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
1 changed files with 5 additions and 6 deletions

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: