Added io.set('transports', ['xhr-polling']); on app.js to resolve the 502 error while trying to connect. This header set the transport method to xhr-polling when the browser has no websocket capabilities