Skip to content

Instantly share code, notes, and snippets.

@demian85
Created August 31, 2011 17:51
Show Gist options
  • Save demian85/1184180 to your computer and use it in GitHub Desktop.
Save demian85/1184180 to your computer and use it in GitHub Desktop.
node http proxy
var httpProxy = require('http-proxy'),
http = require('http');
var options = {
router: {
'.*?\.demian.magic.com': '127.0.0.1:8000'
}
};
var proxyServer = httpProxy.createServer(options);
proxyServer.listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment