diff options
| author | HumairAK <humair88@hotmail.com> | 2016-07-27 18:02:13 +0000 |
|---|---|---|
| committer | HumairAK <humair88@hotmail.com> | 2016-07-27 18:02:13 +0000 |
| commit | 189c183337cf3281056d313c4724536e450a46fd (patch) | |
| tree | 11e0a22dda0bcd3ecd4f5f306e72ee8813817887 /app.js | |
| parent | b19b2306723289e511efdbeae451612ab09bba6f (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.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; |
