I’m really not sure what the issue is here. Maybe I don’t understand the publish/subscribe docs enough.
In my server directory:
Meteor.publish("kudos", function () {
return Kudos.find({});
});
In my client directory:
Meteor.startup(function(){
Meteor.subscribe("kudos");
});
Template.launchsection.kudos = function () {
return Kudos.find({});
};
When I run this, I get an error of Kudos is not defined for the line that returns Kudos.find({});.
What am I missing?
Make sure that you define the Schema in a js file which is executed on both, client and server. A file
Schema.jsin the root folder of your meteor app should do the trick. Have a look at this question.Hope that helps! 🙂