Browse Source

update docs

next
AJ ONeal 4 years ago
parent
commit
a9feafeab3
  1. 18
      README.md

18
README.md

@ -107,11 +107,11 @@ npm install --save greenlock-express@v4
You can use **local file storage** or a **database**. The default is to use file storage. You can use **local file storage** or a **database**. The default is to use file storage.
```bash ```bash
# Note: you can use the CLI to create `server.js` and `greenlock.d/config.json`
npx greenlock init --config-dir ./greenlock.d --maintainer-email 'jon@example.com' npx greenlock init --config-dir ./greenlock.d --maintainer-email 'jon@example.com'
``` ```
<details> `server.js`:
<summary>server.js</summary>
```js ```js
"use strict"; "use strict";
@ -133,10 +133,7 @@ require("greenlock-express")
.serve(app); .serve(app);
``` ```
</details> `app.js`:
<details>
<summary>app.js</summary>
```js ```js
"use strict"; "use strict";
@ -153,11 +150,11 @@ module.exports = app;
</details> </details>
```bash ```bash
# Note: you can use the CLI to edit the config file
npx greenlock add --subject example.com --altnames example.com npx greenlock add --subject example.com --altnames example.com
``` ```
<details> `greenlock.d/config.json`:
<summary>greenlock.d/config.json</summary>
<!-- TODO update manager to write array rather than object --> <!-- TODO update manager to write array rather than object -->
@ -165,9 +162,8 @@ npx greenlock add --subject example.com --altnames example.com
{ "sites": [{ "subject": "example.com", "altnames": ["example.com"] }] } { "sites": [{ "subject": "example.com", "altnames": ["example.com"] }] }
``` ```
</details>
```bash ```bash
# Note: you can use npm start to run server.js with the --staging flag set
npm start -- --staging npm start -- --staging
``` ```
@ -181,7 +177,7 @@ Listening on 0.0.0.0:443 for secure traffic
## Walkthrough ## Walkthrough
Read the [WALKTHROUGH](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/WALKTHROUGH.md) Read the full [WALKTHROUGH](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/WALKTHROUGH.md)
# Examples # Examples

Loading…
Cancel
Save