首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Deepstream不工作

Deepstream不工作
EN

Stack Overflow用户
提问于 2016-09-19 15:15:50
回答 1查看 618关注 0票数 1

首先,我为我糟糕的英语道歉。

最后两天我试着去深流跑步。服务器已启动,但我无法从浏览器连接。

代码语言:javascript
复制
INFO | logger ready
INFO | deepstream version: 1.1.0
INFO | messageConnector ready
INFO | storage ready
INFO | cache ready
INFO | authenticationHandler ready: none
INFO | permissionHandler ready: none
INFO | Using uws websocket server
CLUSTER_JOIN | it9p2a8m-z77t85n9bk04
INFO | Listening for tcp connections on 127.0.0.1:6021
INFO | Listening for browser connections on 127.0.0.1:6020
INFO | Deepstream started

我的index.html看起来像这样:

代码语言:javascript
复制
<!DOCTYPE html>
<html>
<head>
    <script src="https://cdn.rawgit.com/deepstreamIO/deepstream.io-client-js/master/dist/deepstream.min.js"></script>
</head>
<body>
<input type="text" />
<script type="text/javascript">
  var deepstream = require('deepstream.io-client-js');
  const client = deepstream('127.0.0.1:6020').login();
})
</script>
</body>
</html>

无法通过浏览器通过127.0.0.1:6021连接到服务器。浏览器只搜索...

有没有简单的例子?在deepstream上,我唯一可以运行的例子是ds-demo-pong。

谢谢你的帮助,对我糟糕的英语表示抱歉:-(

EN

回答 1

Stack Overflow用户

发布于 2016-09-19 16:03:48

您不能在index.html中直接使用require

尝试:

代码语言:javascript
复制
<!DOCTYPE html>
<html>
<head>
    <script src="https://cdn.rawgit.com/deepstreamIO/deepstream.io-client-js/master/dist/deepstream.min.js"></script>
</head>
<body>
<input type="text" />
<script type="text/javascript">
  const client = deepstream('127.0.0.1:6020').login();
</script>
</body>
</html>

如果不支持require,则在窗口上显示deepstream

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39567380

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档