0.0.1 • Published 8 years ago
express-bandwidth v0.0.1
express-bandwidth
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);
}));
0.0.1
8 years ago