Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 737 Bytes

File metadata and controls

33 lines (22 loc) · 737 Bytes

express-bandwidth

Build Status

Express middleware to monitor the bandwidth of requests.

Limitations:

  1. If you use a reverse proxy that does compression / TLS termination, the bandwidth will not reflect that.

  2. The bandwidth figure doesn't currently include HTTP headers, only request/response body.

Install

npm install --save express-bandwidth express-transform

Usage

import transform from 'express-transform';
import bandwidth from 'express-bandwidth';

app.use(transform());

app.use(bandwidth((bw) => {
  console.log(bw.incoming);
  console.log(bw.outgoing);
}));