i'm working through tutorial on meteor, , understanding should create collection in meteor's mongo instance:
// simple-todos.js tasks = new mongo.collection("tasks"); if (meteor.isclient) { // code runs on client template.body.helpers({ tasks: function () { console.log(tasks.find({})); return tasks.find({}, {sort: {createdat: -1}}); } }); } i've looked @ similar posts, had created collection inside client code block, moved global variable.
when in end mongo, see collection "system.indexes" registered. i'm not sure i'm doing wrong, seems should pretty simple. in advance.
even if declared new collection in app, meteor not "create" collection in mongodb until actively insert in it. still app behave has empty collection in store.
so in order "see" collection in mongo, need insert data in collection, through mongo client or meteor app. or can create collection manually using mongo. (but extent...)
Comments
Post a Comment