Skip to content

Instantly share code, notes, and snippets.

@morgondag
Created June 23, 2014 09:27
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 morgondag/b90cfcbee21eb5208a67 to your computer and use it in GitHub Desktop.
Save morgondag/b90cfcbee21eb5208a67 to your computer and use it in GitHub Desktop.
basic proxy
var httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer();
var http = require('http')
http.createServer(function(req, res) {
proxy.web(req, res, { target: 'http://127.0.0.1/'});
}).listen(8787);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment