Skip to content

Instantly share code, notes, and snippets.

@ivoputzer
Last active August 29, 2015 13:57
Show Gist options
  • Save ivoputzer/9781627 to your computer and use it in GitHub Desktop.
Save ivoputzer/9781627 to your computer and use it in GitHub Desktop.
Node http proxy
var http = require('http')
http.createServer(function(req, res) {
var proxy = http.get({ hostname: process.argv[process.argv.length -1], port: 80, path: req.url }, function(r) {
r.pipe(res)
})
}).listen(8080)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment