Hello i’m trying to connect a project with a anthor project by websocket but i get
Unexpected server response: 502
This is my code
const wss = new ws(config.wsURI);
wss.on(‘open’, async () => {
ws.send(‘something’)
});
wss.on(‘close’, async() => {
console.log(‘disconnected’);
});
wss.on(‘message’, async (data) => {
console.log(data)
});
wss.on(‘error’, (err) => {
console.log(err.message);
});