I have been recently migrating all my apps to node.js, like it should be. And I have been using the mongojs driver, however I recently found that there is a mongodb driver. I was wondering, is there any difference between this two? Performance?
-
2I would recommend the native node driver produced by mongodb themselves: github.com/mongodb/node-mongodb-nativeAri– Ari2014-01-26 21:34:50 +00:00Commented Jan 26, 2014 at 21:34
-
the driver itself says it's a "module for mongodb, that emulates the official mongodb API as much as possible." then I assume there's no difference between the 2 of them. and I still recommend the official driver.yaoxing– yaoxing2014-01-27 02:03:22 +00:00Commented Jan 27, 2014 at 2:03
Add a comment
|
2 Answers
Mongojs is just simpler in its usage, because some functions and are wrapped and easier to call.
It doesn't affect the performance, but theoretically its a bit slower, because there is an additional function call.
You are good using Node.js and the native driver. For starters and cleaner code mongojs is a good option.