diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 23:07:38 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 23:07:38 +0000 |
| commit | 9b615503ced29ee4a421308d3041ad7bf70e2881 (patch) | |
| tree | cd53979d86ea0786ab5bd05ba3800bd1b68e11e2 /app.js | |
| parent | 76d2ef0c64911b449d206df7f206a0d0548266e0 (diff) | |
| parent | ceba1e6492485dba09ef2989a61c090480543072 (diff) | |
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
@@ -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; |
