aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorkumar <kumar.damani@mail.utoronto.ca>2016-07-27 18:04:42 +0000
committerkumar <kumar.damani@mail.utoronto.ca>2016-07-27 18:04:42 +0000
commit11854aac96d07d7f1f428df693d349b0c38750eb (patch)
tree2dfbdf7dcc1be2b20589dd26914eb77ecbb1c536 /app.js
parentdd90e9fbeef08b3f25c21e3e3725ce6b7d14ff7a (diff)
parent807b2b72e6b83339ecb4f5f23999ce8d22d9db46 (diff)
pull
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'app.js')
-rw-r--r--app.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app.js b/app.js
index b0008a3..1bf49f7 100644
--- a/app.js
+++ b/app.js
@@ -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;