What is fixtures in Meteor?

Fixtures in Meteor

Basically in short fixtures is js file where you can set default data which will insert automatically when the app runs.

Like when you created a app and you want that when you will reset your database or delete all record from database then by default some record became inserted in collection of mongodb.

like you can add some data in fixtures

if (user.find().count() === 0) {
  user.insert({
    "name": "Industria de Diseno Textil SA",
    "country": "ES",
    active:false
  });
  userinsert({
    "name": "Under Armour Inc.",
    "country": "US",
    active:false
  });
  user.insert({
    "name": "Nike Inc.",
    "country": "US",
    active:false
  });
}
 So as you set code in fixures that will check if user collection does not have any record then by default it will insert three record when app will run.

Comments