简体   繁体   中英

Best way to use MongoDB with Node.js?

I'm currently using MongoDB native and I'm familiar with it.

Only thing I'm worrying about it is my source quality.

Because of the native driver's nature, nested loop is inevitable.

I have looked at Mongoose but I prefer schemaless way of using MongoDB.

And I could not make a choice among

mongodb-native, mongoose (using mix type), mongolian, mongous, mongoskin

Or is there a way or tutorial to use MongoDB native with keeping the source DRY?

mongodb-native will shortly be on the officially support driver list for mongoDB, so from that perspective, it is probably the safest choice. Combine that (for quality of support) with the Raynos answer in the comments and that should make the choice for you.

I prefer async these days to Step

https://github.com/caolan/async

as it's got a lot more features letting you tailor your code a bit better.

Check this URL http://docs.mongodb.org/ecosystem/drivers/node-js/ mongoose also become official

Mongoose is the officially supported ODM for Node.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM