socket.io 客户端库在哪里? [英] Where is the socket.io client library?

查看:34
本文介绍了socket.io 客户端库在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,如果不使用 node.js,我们将在哪里定位 socket.io 的客户端脚本,没有任何解释作为网络服务器.我找到了一个完整的客户端文件目录,但我需要它们的组合版本(就像使用 node.js webs 服务器时提供的一样).有什么想法吗?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆