0
votes

I am having trouble creating collections using Meteor 1.3 Beta.8. I noticed that all collections were undefined when using code (file at the root of my working folder):

PlayersList = new Mongo.Collection('players');
if (Meteor.isClient) {
  //Some code
  Meteor.subscribe('players');
}
if (Meteor.isServer) {
  Meteor.startup(function () {

  /* Here some inserts */
  var players = [{name:'John', score: 5},{name:'AssFace', score: 10}];
  _.each(players, function(doc) {
    PlayersList.insert(doc);
  });

  Meteor.publish("players", function () {
    return PlayersList.find();
  });
}

So then I turned directly to the Meteor Mongo command-line tool, and tried the following, here's what happened:

Code sample

I'm having the exact same issue on my local machine. What could be causing this issue? And how to fix it? Thank you.

1

1 Answers

3
votes

I think you want db.someCollection.find().