Skip to content

Instantly share code, notes, and snippets.

@randylubin
Created May 28, 2012 23:41
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 randylubin/2821692 to your computer and use it in GitHub Desktop.
Save randylubin/2821692 to your computer and use it in GitHub Desktop.
Node proxy server
var http = require('http'),
httpProxy = require('http-proxy');
//
// Setup proxy server with forwarding
//
var options = {
router: {
'proxytest.randylubin.com': '127.0.0.1:7200',
'randylubin.com': '127.0.0.1:7200',
'pt2.randylubin.com': '127.0.0.1:4000',
'karma.randylubin.com': '127.0.0.1:15110',
'test.randylubin.com': '127.0.0.1:5555',
'stealthisidea.randylubin.com': '127.0.0.1:4000',
'ditchtheconference.com': '127.0.0.1:7000',
'www.ditchtheconference.com': '127.0.0.1:7000',
'www.randylubin.com': '127.0.0.1:7200'
}
};
var proxyServer = httpProxy.createServer(options).listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment