I have 2 node servers running on different ports on a dedicated server on the web.
Is it possible to access one server (Websocket) from another server (Express.js being accessed via HTTP externally) via the localhost of the dedicated server? (As opposed to accessing the Websocket server from the users own machine from the HTML/Javascript served up by Express)?
Trying to reduce the latency for a single (broadcasting) client.
sYou can use http-proxy on server with express, in order to proxy trafik to WebSockets server.
Bear in mind, that WebSockets due to security reasons should come from the same domain and port (it will not allow Cross-Domain from most browsers).
Another option is to have WebSockets server to serve small iframe, that will have JS that will communicate with parent document using PostMessage. This way is less recommended as is just a workaround and will require much more effort to make it stable.