Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Adding the logger module
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed Jun 23, 2013
1 parent da0b7f1 commit fd9de92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
var mongoose = require('mongoose')
, async = require('async')
, _ = require('underscore')
, logger = require('mean-logger')


exports.render = function(req, res){
logger.log("test");

res.render('index', {
user: req.user ? JSON.stringify(req.user) : "null"
})
Expand Down
3 changes: 2 additions & 1 deletion config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ var path = require('path')

module.exports = {
development: {
db: 'mongodb://localhost/mean-dev',
// db: 'mongodb://localhost/mean-dev',
db: 'mongodb://admin:password@ds027308.mongolab.com:27308/meanstack',
root: rootPath,
notifier: notifier,
app: {
Expand Down
4 changes: 4 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
var express = require('express')
, fs = require('fs')
, passport = require('passport')
, logger = require('mean-logger')

/**
* Main application entry file.
Expand Down Expand Up @@ -49,5 +50,8 @@ var port = process.env.PORT || 3000
app.listen(port)
console.log('Express app started on port '+port)

//Initializing logger
logger.init(app, passport, mongoose)

// expose app
exports = module.exports = app

0 comments on commit fd9de92

Please sign in to comment.