Skip to content

Instantly share code, notes, and snippets.

@thegreatape
Created January 21, 2011 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thegreatape/790342 to your computer and use it in GitHub Desktop.
Save thegreatape/790342 to your computer and use it in GitHub Desktop.
var httpProxy = require('http-proxy'),
http = require('http');
httpProxy.createServer(9002, 'localhost').listen(9001);
http.createServer(function(req, res){
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('content!');
res.end();
}).listen(9002);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment