Skip to content

Instantly share code, notes, and snippets.

@nash716
Created July 17, 2017 02:47
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 nash716/29f43bf7d242afd653979b418f69eeb2 to your computer and use it in GitHub Desktop.
Save nash716/29f43bf7d242afd653979b418f69eeb2 to your computer and use it in GitHub Desktop.
http local proxy
node -v # => v8.1.1
node --harmony -e "r=require,h=r('http');h.createServer((q,s)=>{q.pipe(h.request({...q,...r('url').parse(q.url)},a=>{s.writeHead(a.statusCode,a.headers);a.pipe(s)}))}).listen(8081)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment