Where is the socket.io client library?

后端 未结 8 1621
佛祖请我去吃肉
佛祖请我去吃肉 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:08

    I have created a bower compatible socket.io-client that can be install like this :

    bower install sio-client --save
    

    or for development usage :

    bower install sio-client --save-dev
    

    link to repo

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题