Permalink
Browse files

Merge branch 'FAKER' of github.com:goliatone/fakeful into FAKER

  • Loading branch information...
2 parents bdceab2 + 0a71284 commit f8a0df15a90a642bda421aacce6993e48d9e8c3c @goliatone committed Jul 23, 2014
Showing with 19 additions and 10 deletions.
  1. +12 −9 libs/server.js
  2. +7 −1 package.json
View
@@ -3,7 +3,7 @@ var express = require('express'),
logger = require('morgan'),
cookieParser = require('cookie-parser'),
bodyParser = require('body-parser'),
- cors = require('../middleware/cors'),
+ cors = require('cors'),
errorHandler = require('../middleware/errorHandler'),
routes = require('../routes'),
debug = require('debug')('et'),
@@ -54,15 +54,18 @@ server.run = function(config) {
* development error handler
* will print stacktrace
*/
-if (server.get('env') === 'development') {
- server.use(function(err, req, res, next) {
- res.status(err.status || 500);
- res.render('error', {
- message: err.message,
- error: err
- });
+// if (server.get('env') === 'development') {
+require('express-debug')(server, { /* settings */ });
+server.use(require("express-chrome-logger"));
+
+server.use(function(err, req, res, next) {
+ res.status(err.status || 500);
+ res.render('error', {
+ message: err.message,
+ error: err
});
-}
+});
+// }
/*
* production error handler
View
@@ -25,6 +25,12 @@
"multer": "^0.1.2",
"node-csv-json": "^0.2.1",
"faker": "^1.0.0",
- "handlebars": "^2.0.0-alpha.4"
+ "handlebars": "^2.0.0-alpha.4",
+ "cors": "^2.4.1"
+ },
+ "devDependencies": {
+ "express-debug": "^1.1.0",
+ "express-chrome-logger": "^0.1.3",
+ "errorhandler": "^1.1.1"
}
}

0 comments on commit f8a0df1

Please sign in to comment.