Giter Site home page Giter Site logo

proxyserver's Introduction

proxyserver

1)Takes a port and host from command line argument and redirect to the given host 2)Command to run nodemon --exec babel-node -- --optional strict --log --stage 1 -- index.js --host=127.0.0.1 --port 8002 Sets the post to 8002 and redorected host to 127.0.0.1 and default loggins to /log/app1/log 3)Once the server starts you can see the following logs 24 Aug 22:10:50 - [nodemon] v1.4.1 24 Aug 22:10:50 - [nodemon] to restart at any time, enter rs 24 Aug 22:10:50 - [nodemon] watching: . 24 Aug 22:10:50 - [nodemon] starting babel-node --optional strict --log --stage 1 -- index.js --host=127.0.0.1 --port 8002 url =>http://127.0.0.1:8002 host=>127.0.0.1 port=>8002 logpath=>/log/app1.log Proxying request to: http://127.0.0.1:8002/asdf Request received at: /asdf Request received at: /asdf Request received at: /asdf

4)Run a curl command to redirect to a host curl -v http://127.0.0.1:8001/asdf -d "hello proxy"

You can see the following messages

  • About to connect() to 127.0.0.1 port 8001 (#0)
  • Trying 127.0.0.1...
  • Adding handle: conn: 0x7fa67b803a00
  • Adding handle: send: 0
  • Adding handle: recv: 0
  • Curl_addHandleToPipeline: length: 1
    • Conn 0 (0x7fa67b803a00) send_pipe: 1, recv_pipe: 0
  • Connected to 127.0.0.1 (127.0.0.1) port 8001 (#0)

POST /asdf HTTP/1.1 User-Agent: curl/7.30.0 Host: 127.0.0.1:8001 Accept: / Content-Length: 11 Content-Type: application/x-www-form-urlencoded

  • upload completely sent off: 11 out of 11 bytes < HTTP/1.1 200 OK < host: 127.0.0.1:8002 < user-agent: curl/7.30.0 < accept: / < content-length: 11 < content-type: application/x-www-form-urlencoded < connection: close < date: Tue, 25 Aug 2015 05:18:04 GMT <
  • Closing connection 0

proxyserver's People

Contributors

sgudla10 avatar

Watchers

 avatar  avatar

proxyserver's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.