diff options
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -77,7 +77,7 @@ app.use('/', routes); /* Handle error page */ app.use(function(req, res, next){ - res.status(404 || 500); + res.status(404); // respond with html page if (req.accepts('html')) { @@ -90,5 +90,12 @@ app.use(function(req, res, next){ }); +app.use(function(error, req, res, next) { + res.status(500); + url = req.url; + res.render('error', {error: error, url: url}); +}); + + module.exports = app; |
