We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76d0649 commit fb8c5abCopy full SHA for fb8c5ab
README.md
@@ -51,11 +51,14 @@ see the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js)
51
var http = require('http'),
52
httpProxy = require('http-proxy');
53
54
+
55
+ // create a proxy server with custom application logic
56
httpProxy.createServer(function (req, res, proxy) {
57
// Put your custom server logic here
58
proxy.proxyRequest('localhost', '9000', req, res);
59
}).listen(8000);
60
61
+ // create a regular http server and proxy its handler
62
http.createServer(function (req, res){
63
var proxy = new httpProxy.HttpProxy;
64
proxy.watch(req, res);
0 commit comments