Cannot connect to my websocket

Hi there.

I’m trying to create a websocket connection using express-ws. However, whenever I try to connect to it; I get this error:
Error during WebSocket handshake: Unexpected response code: 502
My Code:
app.ws(’/ping’, function(ws, req) {
console.log(“connected?”)
ws.send(200);
ws.on(‘message’, function(msg) {
ws.send(msg);
});
});

My project’s name: testing-lmao-cx

I’ve tried using WebSocket Secure, removing the port number and adding it to no avail.