Skip to content

Instantly share code, notes, and snippets.

Created June 17, 2012 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/2944921 to your computer and use it in GitHub Desktop.
Save anonymous/2944921 to your computer and use it in GitHub Desktop.
Mycollection = new Meteor.Collection("mycollection");
Meteor.startup(function () {
Mycollection.insert({name: test1});
Mycollection.insert({name: test2});
var my_collection = Mycollection.find({}, {sort: {name: 1}});
console.log(my_collection.count);
my_collection.forEach(console.log('test'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment