linghuaj / node-proxy-server

[CodePath] Proxy server created for node camp
1 stars 0 forks source link

Proxy Server

This is a Proxy Server for Node.js submitted as the pre-work requirement for CodePath.

Time spent: [1hr]

Completed:

For help. run

babel-node index.js  -h

Recording of achievements as gif:

solarized dualmode

to reproduce the gif, plz try any of the following:

//do a npm install first

npm start
curl -v http://127.0.0.1:8001 -H 'x-cat:niuniu'

nodemon -x babel-node index --url http://google.com
curl -v http://127.0.0.1:8001 -H 'x-cat:niuniu'

nodemon -x babel-node index --host google.com --port 80
curl -v http://127.0.0.1:8001 -H 'x-cat:niuniu'

babel-node index
curl -v http://127.0.0.1:8001 -H 'x-cat:niuniu'
curl -v http://127.0.0.1:8001 -H 'x-destination-url:http://google.com'

babel-node index --mylog=/tmp/codepath-proxy.log

curl -v http://127.0.0.1:8001 -H 'x-destination-url:http://google.com'

child process:

solarized dualmode

log level:

solarized dualmode