WebSocket connection failed: Error during WebSocket handshake: Unexpected response code: 400

后端 未结 16 1458
攒了一身酷
攒了一身酷 2020-12-04 21:08

I am trying to integrate Socket.io with Angular and I\'m having difficulties making a connection from the client-side to the server. I\'ve looked through other related quest

16条回答
  •  日久生厌
    2020-12-04 21:47

    In my case, I have just install express-status-monitor to get rid of this error

    here are the settings

    install express-status-monitor
    npm i express-status-monitor --save
    const expressStatusMonitor = require('express-status-monitor');
    app.use(expressStatusMonitor({
        websocket: io,
        port: app.get('port')
    }));
    

提交回复
热议问题