socket.io客户端库在哪里? [英] Where is the socket.io client library?
本文介绍了socket.io客户端库在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
据我所知,如果node.js
不用作Web服务器,则没有任何关于我们在何处定位socket.io
的客户端脚本的解释.我已经找到了客户端文件的整个目录,但是我需要它们的组合版本(例如在使用node.js网站服务器时提供的版本).有什么想法吗?
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 server. I've found a whole directory of client side files, but I need them in a combined version (like it's served when using node.js webs servers). Any ideas?
推荐答案
socket.io.js是您要放入客户端html中的内容.像这样:
socket.io.js is what you're going to put into your client-side html. Something like:
<script type="text/javascript" src="socket.io.js"></script>
我的脚本位于:
/usr/local/lib/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js
将该文件复制到您希望服务器提供该文件的位置.
copy that file to where you want your server to serve it.
这篇关于socket.io客户端库在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文