Updated Routing proxy with access logging (markdown)

c-ab 2012-12-30 14:16:26 -08:00
parent 9165d80955
commit ff4bb14225

@ -15,7 +15,7 @@ One of the useful methods of running http-proxy is as a routing proxy. The follo
router.proxyRequest(req,res); router.proxyRequest(req,res);
}); });
proxy.listen(3000, function() { console.log("Routing proxy listening on " + proxy.addresss().port); }); proxy.listen(3000, function() { console.log("Routing proxy listening on " + proxy.address().port); });
the above example uses console.log, but you could use any logging library, e.g. winston, to create access logs with info from req and res. the above example uses console.log, but you could use any logging library, e.g. winston, to create access logs with info from req and res.