v3.0.4: update docs

This commit is contained in:
AJ ONeal 2019-10-26 00:41:15 -06:00
parent 0107bc1d1f
commit 754c623cd1
2 changed files with 18 additions and 2 deletions

View File

@ -6,6 +6,23 @@ ACME.js is a _low-level_ client for Let's Encrypt.
Looking for an **easy**, _high-level_ client? Check out [Greenlock.js](https://git.rootprojects.org/root/greenlock.js). Looking for an **easy**, _high-level_ client? Check out [Greenlock.js](https://git.rootprojects.org/root/greenlock.js).
```js
var acme = ACME.create({ maintainerEmail, packageAgent, notify });
await acme.init(directoryUrl);
// Create Let's Encrypt Account
var accountOptions = { subscriberEmail, agreeToTerms, accountKey };
var account = await acme.accounts.create(accountOptions);
// Validate Domains
var certificateOptions = { account, accountKey, csr, domains, challenges };
var pems = await acme.certificates.create(certificateOptions);
// Get SSL Certificate
var fullchain = pems.cert + '\n' + pems.chain + '\n';
await fs.promises.writeFile('fullchain.pem', fullchain, 'ascii');
```
# Online Demo # Online Demo
See https://greenlock.domains See https://greenlock.domains
@ -186,7 +203,6 @@ A basic example includes the following:
[examples/README.md](https://git.rootprojects.org/root/acme.js/src/branch/master/examples/README.md) [examples/README.md](https://git.rootprojects.org/root/acme.js/src/branch/master/examples/README.md)
covers all of these steps, with comments. covers all of these steps, with comments.
# Install # Install
To make it easy to generate, encode, and decode keys and certificates, To make it easy to generate, encode, and decode keys and certificates,

View File

@ -1,6 +1,6 @@
{ {
"name": "@root/acme", "name": "@root/acme",
"version": "3.0.2", "version": "3.0.4",
"description": "Free SSL certificates for Node.js and Browsers. Issued via Let's Encrypt", "description": "Free SSL certificates for Node.js and Browsers. Issued via Let's Encrypt",
"homepage": "https://rootprojects.org/acme/", "homepage": "https://rootprojects.org/acme/",
"main": "acme.js", "main": "acme.js",