Skip to content

Instantly share code, notes, and snippets.

@pazguille
Last active October 8, 2015 14:28
Show Gist options
  • Save pazguille/3345182 to your computer and use it in GitHub Desktop.
Save pazguille/3345182 to your computer and use it in GitHub Desktop.
Using http-proxy module for node.js
var http = require('http'),
httpProxy = require('http-proxy');
httpProxy.createServer({
hostnameOnly: true,
router: {
'test.me': '127.0.0.1:8080',
'test.com': '127.0.0.1:8081'
}
}).listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment