Skip to content

Commit fb8c5ab

Browse files
committed
updated readme
1 parent 76d0649 commit fb8c5ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ see the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js)
5151
var http = require('http'),
5252
httpProxy = require('http-proxy');
5353

54+
55+
// create a proxy server with custom application logic
5456
httpProxy.createServer(function (req, res, proxy) {
5557
// Put your custom server logic here
5658
proxy.proxyRequest('localhost', '9000', req, res);
5759
}).listen(8000);
5860

61+
// create a regular http server and proxy its handler
5962
http.createServer(function (req, res){
6063
var proxy = new httpProxy.HttpProxy;
6164
proxy.watch(req, res);

0 commit comments

Comments
 (0)