I've been experimenting with meteor 7.1.1 and just need a sanity check,
So basically..
if (Meteor.isServer) {
console.log("Count Server No: "+ Meteor.users.find().count());
Meteor.publish("directory", function () {
return Meteor.users.find();
});
}
// the server side result is Count Server No: 1
if (Meteor.isClient) {
Meteor.subscribe("directory");
console.log("Count Client No: " + Meteor.users.find().count());
}
// the client returns Count Client No: 0
I've come across various tutorials and other options, but it seems like there are different ways to achieve this. If anyone could point out the most efficient method, I would be extremely grateful. PS Hope this information helps someone else.