Skip to content

Instantly share code, notes, and snippets.

@jacobheric
Last active December 15, 2015 16:29
Show Gist options
  • Select an option

  • Save jacobheric/5289586 to your computer and use it in GitHub Desktop.

Select an option

Save jacobheric/5289586 to your computer and use it in GitHub Desktop.
example server side publication of collections in meteor
// Publish complete set of lists to all clients.
Meteor.publish('lists', function () {
return Lists.find();
});
// Publish all items for requested list_id.
Meteor.publish('things', function (id) {
return Things.find({list_id: id});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment