Last active
December 15, 2015 16:29
-
-
Save jacobheric/5289586 to your computer and use it in GitHub Desktop.
example server side publication of collections in meteor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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