Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aral committed Mar 7, 2021
1 parent c87dddd commit 22c9606
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A Node.js wrapper for [Let’s Encrypt](https://letsencrypt.org)’s [Pebble](https://github.com/letsencrypt/pebble) (“a small RFC 8555 ACME test server not suited for a production certificate authority”).

- Downloads the correct Pebble binary for your platform.

- Launches and manages a single Pebble process.

- Returns a reference to the same process on future calls (safe to include in multiple unit tests where order of tests is undetermined)
Expand All @@ -10,7 +12,7 @@ A Node.js wrapper for [Let’s Encrypt](https://letsencrypt.org)’s [Pebble](ht

## Version and platform support

Supports [Pebble version 2.3.0](https://github.com/letsencrypt/pebble/releases/tag/v2.3.0) under [Node.js LTS](https://nodejs.org/en/about/releases/) on platforms with binary [Pebble releases](https://github.com/letsencrypt/pebble/releases/):
Supports [Pebble version 2.3.1](https://github.com/letsencrypt/pebble/releases/tag/v2.3.1) under [Node.js LTS](https://nodejs.org/en/about/releases/) on platforms with binary [Pebble releases](https://github.com/letsencrypt/pebble/releases/):

- Linux AMD 64.
- Windows AMD 64.
Expand All @@ -21,9 +23,11 @@ Supports [Pebble version 2.3.0](https://github.com/letsencrypt/pebble/releases/t
npm i @small-tech/node-pebble
```

As part of the post-installation process, Node Pebble will download the correct Pebble binary for your platform for use at runtime.

## API

### Pebble.ready ([args], [env]) -> Promise<ChidProcess>
### Pebble.ready ([args], [env]) -> Promise&lt;ChildProcess&gt;

Promises to get the Pebble server ready for use. Resolves once Pebble server is launched and ready and Node.js’s TLS module has been patched to accept Pebble server’s [test certificate](https://github.com/letsencrypt/pebble#avoiding-client-https-errors) as well as its [dynamically-generated root and intermediary CA certificates](https://github.com/letsencrypt/pebble#ca-root-and-intermediate-certificates).

Expand Down Expand Up @@ -88,27 +92,23 @@ Pebble.ready('-config customConfig.json')
The following listing launches the Pebble server with its default settings and then shuts it down.

```js
const Pebble = require('..')

async function main() {
console.log('\n⏳ Launching Pebble server…\n')
import Pebble from '@small-tech/node-pebble'

await Pebble.ready()
console.log('\n⏳ Launching Pebble server…\n')

console.log('✔ Pebble server launched and ready.')
console.log('✔ Node.js’s TLS module patched to accept Pebble’s CA certificates.')
await Pebble.ready()

// Do stuff that requires Pebble here.
//
console.log('✔ Pebble server launched and ready.')
console.log('✔ Node.js’s TLS module patched to accept Pebble’s CA certificates.')

console.log('\n⏳ Shutting down Pebble server…\n')
// Do stuff that requires Pebble here.
//

await Pebble.shutdown()
console.log('\n⏳ Shutting down Pebble server…\n')

console.log('✔ Pebble server shut down.\n')
}
await Pebble.shutdown()

main()
console.log('✔ Pebble server shut down.\n')
```

## Install development dependencies (for tests and coverage)
Expand All @@ -120,13 +120,13 @@ npm install
## Run test task

```sh
npm test
npm -s test
```

## Run coverage task

```sh
npm run coverage
npm -s run coverage
```

## Like this? Fund us!
Expand All @@ -137,7 +137,7 @@ We exist in part thanks to patronage by people like you. If you share [our visio

## Copyright

&copy; 2020 [Aral Balkan](https://ar.al), [Small Technology Foundation](https://small-tech.org).
&copy; 2020-2021 [Aral Balkan](https://ar.al), [Small Technology Foundation](https://small-tech.org).

Let’s Encrypt is a trademark of the Internet Security Research Group (ISRG). All rights reserved. Node.js is a trademark of Joyent, Inc. and is used with its permission. We are not endorsed by or affiliated with Joyent or ISRG.

Expand Down

0 comments on commit 22c9606

Please sign in to comment.