How to use Mongoose in Meteor? How to use Mongoose in Meteor? mongoose mongoose

How to use Mongoose in Meteor?


I've decided to just use the Collection2 package because it seems to offer everything that I wanted from Mongoose as an ORM. This packages uses the Simple Schema as a dependency.


Meteor already talks to mongodb. But you can use mongoose. You might have an issue with a 10 second delay with reactivity. Also you won't be able to enjoy using it on the client.

Meteor already has methods to query/update,etc mongodb. But if want you could force mongoose in:

Install mongoose (npm install mongoose). And use it in your meteor code:

 require = __meteor_bootstrap__.require; //to use npm require must be exposed. var mongoose = require('mongoose');