Browse Source

preserve lts support

pull/126/head
butlerx 8 years ago
parent
commit
a9f1a16c4c
No known key found for this signature in database GPG Key ID: B37CA765BAA89170
  1. 28
      app.js

28
app.js

@ -70,16 +70,22 @@ tty.on('disconnect', () => {
console.log('disconnect'); console.log('disconnect');
}); });
async function loadSSL({ sslkey, sslcert }) { function loadSSL({ sslkey, sslcert }) {
try { return new Promise((resolve, reject) => {
return sslkey && sslcert if (sslkey && sslcert) {
? { const ssl = {};
key: await fs.readFile(path.resolve(sslkey)), fs
cert: await fs.readFile(path.resolve(sslcert)), .readFile(path.resolve(sslkey))
} .then(key => {
: {}; ssl.key = key;
} catch (err) { })
console.err(err); .then(fs.readFile(path.resolve(sslcert)))
process.exit(1); .then(cert => {
ssl.cert = cert;
})
.then(resolve(ssl))
.catch(reject);
} }
resolve({});
});
} }

Loading…
Cancel
Save