김지훈

Add : cars module

다른 도메인에서 접근 가능하도록 처리함. 임시.
......@@ -4,7 +4,7 @@ var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var cors = require('cors');
var routes = require('./routes/index');
var users = require('./routes/users');
......@@ -17,6 +17,7 @@ app.set('view engine', 'jade');
// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(cors());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
......@@ -56,8 +57,8 @@ app.use(function(err, req, res, next) {
});
});
app.listen(process.env.PORT||3000, function(){
console.log ("Server is running at 3000");
app.listen(process.env.PORT||4000, function(){
console.log ("Server is running at 4000");
});
module.exports = app;
......
......@@ -9,6 +9,7 @@
"async": "^2.1.2",
"body-parser": "~1.15.1",
"cookie-parser": "~1.4.3",
"cors": "^2.8.1",
"debug": "~2.2.0",
"express": "~4.13.4",
"jade": "~1.11.0",
......