There are several MongoDB modules available for Node.js in the following link - https://github.com/joyent/node/wiki/modules#wiki-db-nosql-mongo
Please, suggest me one (I'd like to know why you choose that one?).
It depends on what level of abstraction you want from your data. If you want something similar to an ORM, then Mongoose is the obvious choice and is popular.
However, the node-mongodb-native driver gives you clean duplication of almost the entire MongoDB API and since BSON is translated to JSON and JavaScript is a flexible dynamic language, there's really no need for an ORM. The latter does have benefits such a defining a schema which helps with validation and other tasks, but it also limits your flexibility.
Mongoskin is built atop node-mongodb-native but gives you the ability to have additional JavaScript method bindings and deal with connections and cursors easier. It's pretty lightweight, so you can stick with the basics or do more. This library is my personal preference and our team has built our own tooling and validation system around it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With