Meteor Mongo

Since we haven't published and subscribed to our games, the only way to test that our seed data was inserted correctly is to directly communicate with Mongo.

To do that we can go to our terminal and type:

meteor mongo
db.games.find()

Using the Mongo console

Since we are not in the Meteor environment we don't have access to Javascript variables like Teams. Instead we use the parameter we passed to our collection definition - so for Games = Mongo.Collection('games'); it's 'games'.

As you can see, the game exists but the output is rather messy. We can clean it up by writing db.games.find().pretty(), however I recommend using this npm package, which adds indentation and syntax highlighting for us. All I had to do is npm install -g mongo-hacker and it just worked:

The 'mongo-hacker' npm package makes it a lot clearer

I'll leave it up to you to check if the teams were inserted correctly.