Node js - Socket.io-client is not connecting to socket.io server

前端 未结 4 439
闹比i
闹比i 2021-01-01 16:11

I am trying to connect to a socket.io-client using the following code:

Server:

// Load requirements
var http = require(\'http\'),
    io = require(\'         


        
4条回答
  •  不知归路
    2021-01-01 16:19

    you can use localhost. It works for me as well. You must use your ip address and port that works for you

提交回复
热议问题