Update README.md
This commit is contained in:
parent
ee4570322c
commit
8c30756fb4
20
README.md
20
README.md
|
@ -69,7 +69,9 @@ le.register({
|
||||||
});
|
});
|
||||||
|
|
||||||
// IMPORTANT
|
// IMPORTANT
|
||||||
// you also need BOTH an http AND https server
|
// you also need BOTH an http AND https server that serve directly
|
||||||
|
// from webrootPath, which might as well be a special folder reserved
|
||||||
|
// only for acme/letsencrypt challenges
|
||||||
//
|
//
|
||||||
// app.use('/', express.static(config.le.webrootPath))
|
// app.use('/', express.static(config.le.webrootPath))
|
||||||
```
|
```
|
||||||
|
@ -269,13 +271,15 @@ API
|
||||||
===
|
===
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
LetsEncrypt.create(backend, bkDefaults, handlers)
|
LetsEncrypt.create(backend, bkDefaults, handlers) // wraps a given "backend" (the python client)
|
||||||
le.middleware()
|
LetsEncrypt.stagingServer // string of staging server for testing
|
||||||
le.sniCallback(hostname, function (err, tlsContext) {})
|
|
||||||
le.register({ domains, email, agreeTos, ... }, cb)
|
le.middleware() // middleware for serving webrootPath to /.well-known/acme-challenge
|
||||||
le.fetch({domains, email, agreeTos, ... }, cb)
|
le.sniCallback(hostname, function (err, tlsContext) {}) // uses fetch (below) and formats for https.SNICallback
|
||||||
le.validate(domains, cb)
|
le.register({ domains, email, agreeTos, ... }, cb) // registers or renews certs for a domain
|
||||||
le.registrationFailureCallback(err, args, certInfo, cb)
|
le.fetch({domains, email, agreeTos, ... }, cb) // fetches certs from in-memory cache, occassionally refreshes from disk
|
||||||
|
le.validate(domains, cb) // do some sanity checks before attemping to register
|
||||||
|
le.registrationFailureCallback(err, args, certInfo, cb) // called when registration fails (not implemented yet)
|
||||||
```
|
```
|
||||||
|
|
||||||
### `LetsEncrypt.create(backend, bkDefaults, handlers)`
|
### `LetsEncrypt.create(backend, bkDefaults, handlers)`
|
||||||
|
|
Loading…
Reference in New Issue