ZHANG Cheng
ZHANG Cheng

Reputation: 123

How to properly use Meteor.connect() to connect with another Meteor server

My new client code in /client/main.coffee

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

In my original meteor code, the "system" is published and the "system" collection contains one doc. I can verified it with "System.find().count()".

On my new client browser, "System.find().count()" always return 0.

Upvotes: 5

Views: 2954

Answers (1)

jifeng.yin
jifeng.yin

Reputation: 2151

Please try Xingyun.subscribe "system"

Upvotes: 6

Related Questions