diff options
| author | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-27 18:04:42 +0000 |
|---|---|---|
| committer | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-27 18:04:42 +0000 |
| commit | 11854aac96d07d7f1f428df693d349b0c38750eb (patch) | |
| tree | 2dfbdf7dcc1be2b20589dd26914eb77ecbb1c536 /app.js | |
| parent | dd90e9fbeef08b3f25c21e3e3725ce6b7d14ff7a (diff) | |
| parent | 807b2b72e6b83339ecb4f5f23999ce8d22d9db46 (diff) | |
pull
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -73,7 +73,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')) { @@ -86,5 +86,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; |
