当前位置:网站首页>Comparison and selection of mongodb Mongoose

Comparison and selection of mongodb Mongoose

2020-11-12 23:19:53 Jintian

Data comparison

  1. npmjs indicators
Tool library Weekly downloads Decompression size Number of documents The latest version Address
mongodb 2,033,611 2.04MB 213 3.6.1 https://www.npmjs.com/package/mongodb
mongoose 1,046,208 1.48MB 147 4.0.2 https://www.npmjs.com/package/mongoose

Search for :
 Insert picture description here

  1. github indicators
Tool library star fork contributors Release Address
mongodb 8.7K 1.6K 324 393 https://github.com/mongodb/node-mongodb-native
mongoose 21.4K 2.9K 525 602 https://github.com/Automattic/mongoose
  1. github Introduce
    • mongodb: The official MongoDB driver for Node.js.
    • mongoose: Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Mongoose supports both promises and callbacks.

mongodb: Officially developed NodeJS Read write tool library .
mongoose: Designed for asynchronous environments 、MongoDB Object model tool for , He supported promise And callback .

choose

Overall contrast ,mongodb As an official library , There is no obvious overwhelming advantage .
So I'll choose... For the moment mongose, Only personal views .

In the later period, if there are the following reasons , May consider from mondoose The switch to mongodb:

  • API Use details
  • Community 、 Blog and other atmosphere
  • The team requires

NOTE: As of :2020-9-4 21:39:08

版权声明
本文为[Jintian]所创,转载请带上原文链接,感谢

随机推荐