shwethha / NodeJsRep

Training repository
0 stars 0 forks source link

NodeJsRep

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

Time spent: [5 hrs]

Completed:

Walkthrough Gif:

Video Walkthrough Starting the Server

babel-node index.js (npm start/ bode not working on windows machine)

Features

Echo Server: (Also working for Localhost)

curl -v -X POST http://127.0.0.1:8000 -d "hello self" -H "x-asdf: yodawg"

Port 8001 will proxy to the echo server on port 8000.

curl -v http://127.0.0.1:8001/asdf -d "hello proxy"

CLI Arguments:

The following CLI arguments are supported:

--8000

The host of the destination server. Defaults to 127.0.0.1.

--8000 --8001

The port of the destination server. Defaults to 8000 when a host is not specified.

curl http://127.0.0.1:8000

curl -v http://127.0.0.1:8000 -d "hello world" -H 'x-asdf: foo'

The follow http header(s) are supported:

x-destination-url