Summarize an express request response for logging
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
History.md
Readme.md
index.js
package.json

Readme.md

response-summary

Summarize an express response for logging.

Example

var summary = require('response-summary');

var app = express();
app.get(function (req, res, next) {
  var response = summary(req, res);
  console.log('bytes sent: ' + response.size);
  next();
});

API

summary(req, res)

Return an object summarizing a response.

License

WWWWWW||WWWWWW
 W W W||W W W
      ||
    ( OO )__________
     /  |           \
    /o o|    MIT     \
    \___/||_||__||_|| *
         || ||  || ||
        _||_|| _||_||
       (__|__|(__|__|