Home > other >  Connections using websockets using express
Connections using websockets using express

Time:06-08

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 127.0.0.1:3000 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 |
      ---------           ---------------         --------------

CodePudding user response:

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

  • Related