0

Pretty basic. Once I run this nothing else runs following this. Why is this? If you need more information, let me know.

// Find all Models.
Model.find(function(err, model) {
    for(var i = 0; i < feels.length; i++) {
        urls.push(model[i]._doc.information);
    }   
});
ryndshn
  • 692
  • 2
  • 13
  • 30

1 Answers1

0

The signature for the find method is as follows from the mongoose documentation.

http://mongoosejs.com/docs/api.html#model_Model.find

Model.find(conditions, [projection], [options], [callback])

The conditions are not optional.

If you actually have a model defined called Model I would try.

Model.find({}, function(err, model) {
    if (err) return console.error(err);
    console.dir(model);
    for(var i = 0; i < feels.length; i++) {
        urls.push(model[i]._doc.information);
    }   
});

If this is not the case, a little more detail would be great, which code is it exactly that is not running?

Jarrod
  • 163
  • 6