update instructions for greenlock v4

This commit is contained in:
AJ ONeal 2020-07-29 01:55:55 +00:00
parent 8a0cf7df5c
commit d1308f5aca
1 changed files with 31 additions and 17 deletions

View File

@ -30,26 +30,25 @@ Register and DuckDNS Domain and Save the API Token:
# Usage
First you create an instance with your credentials:
```js
var dns01 = require('acme-dns-01-duckdns').create({
baseUrl: 'https://www.duckdns.org/update', // default
token: 'xxxx'
});
```
Then you can use it with any compatible ACME library,
Then you can use this with any compatible ACME library,
such as Greenlock.js or ACME.js.
### Greenlock.js
### Greenlock CLI
```bash
npx greenlock defaults --challenge-dns-01 acme-dns-01-duckdns --challenge-dns-01-token xxxx
```
### Greenlock API
```js
var Greenlock = require('greenlock-express');
var greenlock = Greenlock.create({
greenlock.manager.defaults({
challenges: {
'dns-01': dns01
// ...
'dns-01': {
module: 'acme-dns-01-duckdns',
baseUrl: 'https://www.duckdns.org/update', // default
token: 'xxxxxxx'
}
}
});
```
@ -60,11 +59,26 @@ documentation for more details.
### ACME.js
First you create an instance with your credentials:
```js
// TODO
var dns01 = require('acme-dns-01-duckdns').create({
baseUrl: 'https://www.duckdns.org/update', // default
token: 'xxxx'
});
```
See the [ACME.js](https://git.rootprojects.org/root/acme-v2.js) for more details.
```js
acme.certificates.create({
account,
accountKey,
csr,
domains,
challenges: { 'dns-01': dns01 }
});
```
See the [ACME.js](https://git.rootprojects.org/root/acme.js) for more details.
### Build your own