我是deepstream.io的新用户,我正在尝试从下面的深流站点运行示例
https://deepstream.io/tutorials/core/getting-started-quickstart/
但是在启动deepstream服务器之后,当我尝试访问下面的url时
http://localhost:6020/deepstream
什么都没发生
发布于 2017-02-23 00:49:09
要解决此问题,您需要将index.html (或任何您命名的包含deepstream客户端连接的文件)托管到the服务器。
当您连接到When服务器以访问index.html时,它将执行javascript以启动深流客户端,然后该客户端将建立到运行在默认端口6020上的深流服务器的连接
希望这能有所帮助。
发布于 2017-02-24 23:09:55
Hi Im also a new user. Have you installed all the needed packages?
For me it works and my Index.html looks like this:
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/deepstream.io-client-js/2.1.1/deepstream.js"></script>
</head>
<body>
<div id="app"></div>
<input type="text" />
<script type="text/javascript">
var client = deepstream('localhost:6020').login();
var record = client.record.getRecord('myname');
var input = document.querySelector('input');
console.log("helloooo");
record.set('firstname', input.value);
});
record.subscribe('firstname', function(value) {
input.value = value;
});
</script>
</body>
</html>发布于 2018-07-05 16:26:39
deepstream是一个websocket服务器-它需要使用deepstream客户端来访问(参见上面的答案)。在浏览器中键入URL (或使用其他HTTP通信方式请求它)将不起任何作用。
https://stackoverflow.com/questions/42319137
复制相似问题