a little error handling

This commit is contained in:
Martin Donnelly 2018-06-13 23:31:48 +01:00
parent 61b4a9f422
commit 381d77ac64

View File

@ -176,6 +176,10 @@ function getUrl (req, res) {
app.get('/:encoded_id', cache('15 minutes'), getUrl);
process.on('uncaughtException', function (err) {
console.error(err);
});
const server = app.listen(port, () => {
logger.info(`Server listening on port ${port}`);
});