I cannot log with Morgan. It doesn\'t log info to console. The documentation doesn\'t tell how to use it.
I want to see what a variable is. This is a code from
var express = require('express');
var fs = require('fs');
var morgan = require('morgan')
var app = express();
// create a write stream (in append mode)
var accessLogStream = fs.createWriteStream(__dirname + '/access.log',{flags: 'a'});
// setup the logger
app.use(morgan('combined', {stream: accessLogStream}))
app.get('/', function (req, res) {
res.send('hello, world!')
});
example nodejs + express + morgan