2012-08-06 17 views
5

Mi nuevo código de cliente en /client/main.coffeeCómo utilizar adecuadamente Meteor.connect() para conectar con otro servidor

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

En mi código de meteoritos original, se publica el "sistema" y el Meteor La colección "sistema" contiene un documento. Puedo verificarlo con "System.find(). Count()".

En mi nuevo navegador del cliente, "System.find(). Count()" siempre devuelve 0.

Respuesta

6

Inténtelo Xingyun.subscribe "system"

+0

Tiene usted razón! Debo leer el documento con más cuidado en http://docs.meteor.com/#meteor_connect –

Cuestiones relacionadas