Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Marak committed Aug 2, 2010
1 parent 76d0649 commit fb8c5ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ see the [demo](https://github.com/nodejitsu/node-http-proxy/blob/master/demo.js)
var http = require('http'),
httpProxy = require('http-proxy');


// create a proxy server with custom application logic
httpProxy.createServer(function (req, res, proxy) {
// Put your custom server logic here
proxy.proxyRequest('localhost', '9000', req, res);
}).listen(8000);

// create a regular http server and proxy its handler
http.createServer(function (req, res){
var proxy = new httpProxy.HttpProxy;
proxy.watch(req, res);
Expand Down

0 comments on commit fb8c5ab

Please sign in to comment.