Created
April 21, 2013 12:57
-
-
Save vgheri/5429499 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = require('./Config-debug'); | |
var winston = require('winston'); | |
var mongoose = require('mongoose'); | |
var server = require('./Server'); | |
// We will log normal api operations into api.log | |
console.log("starting logger..."); | |
winston.add(winston.transports.File, { | |
filename: config.logger.api | |
}); | |
// We will log all uncaught exceptions into exceptions.log | |
winston.handleExceptions(new winston.transports.File({ | |
filename: config.logger.exception | |
})); | |
console.log("logger started. Connecting to MongoDB..."); | |
mongoose.connect(config.db.mongodb); | |
console.log("Successfully connected to MongoDB. Starting web server..."); | |
server.start(); | |
console.log("Successfully started web server. Waiting for incoming connections..."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment