How to use the morgan.common function in morgan

To help you get started, we’ve selected a few morgan examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Pomegranate / Pomegranate / lib / Server / Middleware.js View on Github external
 * @file Middleware
 * @author Jim Bulkowski 
 * @project Pomegranate
 * @license MIT {@link}

var _ = require('lodash');
var fs = require('fs');
var path = require('path');
var responseTime = require('response-time');
var serveStatic = require('serve-static');
var compress = require('compression');
var morgan = require('morgan');
var logCommon = morgan.compile(morgan.common);
var bodyParser = require('body-parser');
var session = require("express-session");
var RedisStore = require('connect-redis')(session);
var favicon = require('serve-favicon');
var chalk = require('chalk');
 * Manages middlewares.
 * @module Middleware

module.exports = function(logger, redis){

  return {
    Session: function(opts){
        logger.log('ExpressConfig: Session Middleware not loaded.')


HTTP request logger middleware for node.js

Latest version published 4 years ago

Package Health Score

81 / 100
Full package analysis