diff --git a/config/express.js b/config/express.js index 849470e..49fa47e 100755 --- a/config/express.js +++ b/config/express.js @@ -72,7 +72,7 @@ module.exports = function (db) { app.set('views', './app/views'); // Enable logger (morgan) - app.use(morgan(logger.getLogFormat(), logger.getLogOptions())); + //app.use(morgan(logger.getLogFormat(), logger.getLogOptions())); // Environment dependent middleware if (process.env.NODE_ENV === 'development') { diff --git a/config/mysql.js b/config/mysql.js index 18d8a38..d848558 100644 --- a/config/mysql.js +++ b/config/mysql.js @@ -6,7 +6,7 @@ var Sequelize = require('sequelize'), var db = {}; -var sequelize = new Sequelize(config.db.db, config.db.user, config.db.pass, {host: config.db.host, "dialect": "mysql" }); +var sequelize = new Sequelize(config.db.db, config.db.user, config.db.pass, { logging: false, host: config.db.host, "dialect": "mysql" }); fs .readdirSync(__dirname + '/../app/models') @@ -29,7 +29,7 @@ db.Sequelize = Sequelize; sequelize.query('SET FOREIGN_KEY_CHECKS = 0') .then(function(){ - return sequelize.sync({ force: true }).catch(function(err){ + return sequelize.sync(/*{ force: true }*/).catch(function(err){ if(err) console.error('Could not connect to MySQL!', err); }); diff --git a/config/passport.js b/config/passport.js index 4f152b1..debd075 100755 --- a/config/passport.js +++ b/config/passport.js @@ -21,9 +21,7 @@ module.exports = function() { // Deserialize sessions passport.deserializeUser(function(id, done) { - console.log('oi1'); User.findById(id).then(function(user) { - done(null, user); }); }); diff --git a/server.js b/server.js index f7d4703..208dbd9 100755 --- a/server.js +++ b/server.js @@ -1,31 +1,9 @@ 'use strict'; -/** - * Module dependencies. - */ var init = require('./config/init')(), config = require('./config/config'), -// mongoose = require('mongoose'), chalk = require('chalk'), db = require('./config/mysql'); -/** - * Main application entry file. - * Please note that the order of loading is important. - */ - -// Bootstrap db connection -//var db = mongoose.connect(config.db.uri, config.db.options, function(err) { -// if (err) { -// console.error(chalk.red('Could not connect to MongoDB!')); -// console.log(chalk.red(err)); -// } -//}); -//mongoose.connection.on('error', function(err) { -// console.error(chalk.red('MongoDB connection error: ' + err)); -// process.exit(-1); -// } -//); - // Init the express application var app = require('./config/express')(db);