/** * @file * * * User: marand * Date: 30/08/15 * Time: 11:33 */ if (Posts.find().count() === 0) { var data = [ { title: "Introducing Telescope", url: "http://sachagreif.com/introducing-telescope" }, { title: "Meteor", url: "http://meteor.com" }, { title: "The Meteor book", url: "http://themeteorbook.com" } ]; data.forEach(function (post) { Meteor._debug("Inserting", post); Posts.insert(post); }); } else { Meteor._debug('Posts collection is not empty'); }