Reputation: 873
Using meteor js on the client side and from this condition: if (Meteor.isClient), is it possible to connect to a mongodb collection directly?
If so, how can I do that?
Upvotes: 0
Views: 120
Reputation: 19544
Well, that's what Meteor is all about! See the documentation. Simple example:
if(Meteor.isClient) {
Documents = new Meteor.Collection('documents');
var document = Documents.findOne({title: 'Example'});
}
Upvotes: 1