Gracefully handle web server errors

master
Dragory 2018-08-08 00:54:01 +03:00
parent c52938fc84
commit ff977b3eea
1 changed files with 4 additions and 0 deletions

View File

@ -84,5 +84,9 @@ module.exports = () => {
} }
}); });
server.on('error', err => {
console.log('[WARN] Web server error:', err.message);
});
server.listen(config.port); server.listen(config.port);
}; };