Where is the socket.io client library?

后端 未结 8 1625
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 23:40

As far as I have seen, there is no explanation as to where we are to locate the client side script for socket.io if node.js is not used as the web

8条回答
  •  感情败类
    2020-12-14 00:16

    I think that better and proper way is to load it from this url

    src="/socket.io/socket.io.js" 
    

    on the domain where socket.io runs. What is positive on this solution is that if you update your socket.io npm module, your client file gets updated too and you don't have to copy it every time manually.

提交回复
热议问题