This commit is contained in:
Dobie Wollert
2014-07-25 03:00:29 -04:00
parent c63d462188
commit a403c9079f
39 changed files with 2875 additions and 3541 deletions

View File

@ -6,6 +6,13 @@ var env = process.env.NODE_ENV || 'development',
config = require('./config/config')[env],
mongoose = require('mongoose');
var log = require('log4node');
log.reconfigure({
level: 'info',
file: 'server.log'
});
log.info("----- Server Started -----");
// bootstrap db connection
mongoose.set('debug', config.debug);
@ -34,11 +41,13 @@ var auth = require('./config/auth')(app, passport);
var calendar = require('./config/calendar')(config);
var directory = require('./config/directory')(config);
// Bootstrap routes
require('./config/routes')(app, auth, piler, calendar, config);
require('./config/routes')(app, auth, piler, calendar, directory, config);
GLOBAL.health = 'OK'
var port = process.env.PORT || 8000
server.listen(port)
console.log('Express app started on port ' + port)
console.log('Express app started on port ' + port)