0

我在深流中有些困惑,是否可以从我的服务器与客户端通信?例如,有没有办法在服务器上做这样的事情?我目前正在浏览器中打开一个发布到其他客户端的客户端连接。我宁愿在我的服务器中有下面的代码。

var client = deepstream('localhost:6020').login()
var record = client.record.getRecord('new-record')

#Publish a message to all listeners of 'listen-channel' from my server?
record.set('listen-channel', 'message');

然后让客户听:

record.subscribe('listen-channel', function(value) {
        console.log(value);
4

1 回答 1

0

当然,只需从节点进程运行它。Deepstream“客户端”可以是后端和前端进程,权限用于区分谁可以做什么。

在此处输入图像描述

于 2016-11-23T09:39:55.783 回答