code: function logger () {
    return function (req, res, next) {
      var _start = new Date();
  
      function logRequest () {
        log.info({req: req, res: res});
        log.info('Exec Time', (new Date()) - _start, 'ms');
      }
  
      res.once('finish', logRequest);
      res.once('close', logRequest);
  
      next();
    };
  }
docs: app.listen(process.env.PORT || 3000); lib