Connections using websockets using express


I am new at nodejs and websockets and i would like to have some explanation about this theme. I’ve already search over the internet and i can only find client/server connections and that is not what i am searching.

Basically, i have a nodejs server named "servertes.js" with localhost:8080 that is hosting my webpage.

I need to send requests from my webpage to one external server "extServer.js" with that is already made and i don’t have control over it. The only server that i have control is "servertest.js".

All the requests must be received by servertest.js that sends the request to the extServer.js and vice-versa.

      ---------           ---------------         --------------
     | Webpage | <------>| servertest.js |<----->| extServer.js |
      ---------           ---------------         --------------


In this scenario you act as the client from your controlled server. Sockets are always host/server to client/receiver.

Answered By – jesseb0rn

Answer Checked By – Katrina (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.