proxy connection errors no longer crash the server, fixes #37

This commit is contained in:
Lloyd Brookes
2016-05-31 09:31:44 +01:00
parent 4ae36ffe63
commit 497653d92e
4 changed files with 20 additions and 10 deletions

View File

@ -62,6 +62,12 @@ if (options.misc.help) {
mocks: options.server.mocks
})
app.on('error', err => {
if (options.server['log-format']) {
console.error(ansi.format(err.message, 'red'))
}
})
if (options.server.https) {
options.server.key = path.resolve(__dirname, '..', 'ssl', '127.0.0.1.key')
options.server.cert = path.resolve(__dirname, '..', 'ssl', '127.0.0.1.crt')