aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorHumairAK <humair88@hotmail.com>2016-07-27 18:02:13 +0000
committerHumairAK <humair88@hotmail.com>2016-07-27 18:02:13 +0000
commit189c183337cf3281056d313c4724536e450a46fd (patch)
tree11e0a22dda0bcd3ecd4f5f306e72ee8813817887 /app.js
parentb19b2306723289e511efdbeae451612ab09bba6f (diff)
fixed tests to work again, added db connectivity, moved dbtests folder out so as not to interfere with mocha recursive search
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;