Skip to content

Instantly share code, notes, and snippets.



Created Apr 21, 2013
What would you like to do?
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...");
console.log("Successfully connected to MongoDB. Starting web server...");
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