exit when complete
This commit is contained in:
parent
58e43b8199
commit
27092bdd7f
|
@ -15,6 +15,7 @@ var acmeDiscoveryUrl = LeCore.stagingServerUrl;
|
|||
var challengeStore = require('./challenge-store');
|
||||
var certStore = require('./cert-store');
|
||||
var serve = require('./serve');
|
||||
var closer;
|
||||
|
||||
var accountPrivateKeyPem = null;
|
||||
var domainPrivateKeyPem = null;
|
||||
|
@ -94,6 +95,7 @@ function runDemo() {
|
|||
|
||||
console.log('[certs]');
|
||||
console.log(err || certs);
|
||||
closer();
|
||||
|
||||
});
|
||||
|
||||
|
@ -106,7 +108,7 @@ function runDemo() {
|
|||
//
|
||||
// Setup the Server
|
||||
//
|
||||
serve.init({
|
||||
closer = serve.init({
|
||||
LeCore: LeCore
|
||||
// needs a default key and cert chain, anything will do
|
||||
, httpsOptions: require('localhost.daplie.com-certificates')
|
||||
|
|
|
@ -73,4 +73,10 @@ module.exports.init = function (deps) {
|
|||
http.createServer(acmeResponder).listen(80, function () {
|
||||
console.log('Listening http on', this.address());
|
||||
});
|
||||
|
||||
return function () {
|
||||
// Note: we should just keep a handle on
|
||||
// the servers and close them each with server.close()
|
||||
process.exit(1);
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue