'use strict'; /** * Module dependencies. */ var config = require('./config/config'), mongoose = require('mongoose'); /** * Main application entry file. * Please note that the order of loading is important. */ // Bootstrap db connection var db = mongoose.connect(config.db); // Init the express application var app = require('./config/express')(db); // Bootstrap passport config require('./config/passport')(); // Start the app by listening on app.listen(config.port); // Expose app exports = module.exports = app; // Logging initialization console.log('Using the "' + process.env.NODE_ENV + '" envrionment file'); console.log('MEAN.JS application started on port ' + config.port);