HenningM / express-ws

WebSocket endpoints for express applications
BSD 2-Clause "Simplified" License
877 stars 142 forks source link

Error: Unexpected server response: 502 #154

Open iocmet opened 2 years ago

iocmet commented 2 years ago

I need to send data from the js node of the application to another application, but when I try to send it, it gives me an error Error: Unexpected server response: 502

const WebSocket = require ('ws');

const ws = new WebSocket ('ws: // url_here');

ws.on ('open', function open () { ws.send ('test'); });