如何正确使用Meteor.connect()连接另一台Meteor服务器

时间:2012-08-06 12:22:19

标签: meteor

我在/client/main.coffee中的新客户端代码

Xingyun = Meteor.connect "localhost:3000"
System = new Meteor.Collection "system", Xingyun
Meteor.subscribe "system"

在我的原始流星代码中,“系统”已发布,“系统”集合包含一个文档。我可以用“System.find()。count()”验证它。

在我的新客户端浏览器上,“System.find()。count()”总是返回0。

1 个答案:

答案 0 :(得分:6)

请尝试Xingyun.subscribe "system"