Meteor JS : Client not getting data from Mongo DB
I have started learning MeteorJS and made a sample app. I have a collection in mongoDB and I am trying to see that collection in client Here is my server Code(file is in /libs) newColl=new Meteor.Collection("newColl"); if(Meteor.isServer){ Meteor.publish('newCollectionData', function(){ console.log(newColl.find().fetch()); return newColl.find(); }); } Here is My client Code(file is in /client) Meteor.subscribe("newCollectionData"); //console.log(newColl.find()); console.log(newColl.find().fetch()); var data= newColl.find().fetch(); console.log(data); The log in server prints the data correctly