Skip to content Skip to sidebar Skip to footer

Insert Data In Collection At Meteor's Startup

I would like to insert data at Meteor's startup. (And after from a JSON file) At startup, I create a new account and I would like to insert data and link it to this account once th

Solution 1:

Ok, you'll want to check out Structuring your application. You'll have to make the file with the definition load earlier, or the one with the fixture later.

Normally you have your collections inside lib/ and your fixtures inside server/fixtures.js.

So if you put your insert code into server/fixtures.js it'll work.

Post a Comment for "Insert Data In Collection At Meteor's Startup"