- How do I use node.js http-proxy for logging htttp traffic in a computer?
- var http = require('http'),
- var httpProxy = require('http-proxy');
- httpProxy.createServer(function (req, res, proxy) {
- //
- // I would add logging here
- //
- proxy.proxyRequest(req, res, { host: 'www.google.com', port: 80 });
- }).listen(18000);