update instructions for greenlock v4
This commit is contained in:
parent
8a0cf7df5c
commit
d1308f5aca
48
README.md
48
README.md
|
@ -30,26 +30,25 @@ Register and DuckDNS Domain and Save the API Token:
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
First you create an instance with your credentials:
|
Then you can use this with any compatible ACME library,
|
||||||
|
|
||||||
```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,
|
|
||||||
such as Greenlock.js or ACME.js.
|
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
|
```js
|
||||||
var Greenlock = require('greenlock-express');
|
greenlock.manager.defaults({
|
||||||
var greenlock = Greenlock.create({
|
|
||||||
challenges: {
|
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
|
### ACME.js
|
||||||
|
|
||||||
|
First you create an instance with your credentials:
|
||||||
|
|
||||||
```js
|
```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
|
### Build your own
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue