This commit is contained in:
AJ ONeal 2015-12-15 20:34:16 -08:00
parent bcad51d046
commit ffb130ec0a
1 changed files with 5 additions and 16 deletions

View File

@ -36,6 +36,11 @@ You will follow these steps to obtain certificates:
#### Register Account & Domain #### Register Account & Domain
**But wait**, there's more!
See [example/letsencrypt.js](https://github.com/Daplie/letiny-core/blob/master/example/letsencrypt.js)
See
```javascript ```javascript
'use strict'; 'use strict';
@ -45,11 +50,6 @@ var email = 'user@example.com'; // CHANGE TO YOUR EMAIL
var domains = 'example.com'; // CHANGE TO YOUR DOMAIN var domains = 'example.com'; // CHANGE TO YOUR DOMAIN
var acmeDiscoveryUrl = LeCore.stagingServerUrl; // CHANGE to production, when ready var acmeDiscoveryUrl = LeCore.stagingServerUrl; // CHANGE to production, when ready
var challengeStore = require('./challenge-store');
var certStore = require('./cert-store');
var serve = require('./serve');
var closer;
var accountPrivateKeyPem = null; var accountPrivateKeyPem = null;
var domainPrivateKeyPem = null; var domainPrivateKeyPem = null;
var acmeUrls = null; var acmeUrls = null;
@ -101,17 +101,6 @@ function runDemo() {
} }
); );
} }
//
// Setup the Server
//
closer = serve.init({
LeCore: LeCore
// needs a default key and cert chain, anything will do
, httpsOptions: require('localhost.daplie.com-certificates')
, challengeStore: challengeStore
, certStore: certStore
});
``` ```
#### Run a Server on 80, 443, and 5001 (https/tls) #### Run a Server on 80, 443, and 5001 (https/tls)