mongodb - mongoose还是mongojs?
黄舟
黄舟 2017-04-24 09:12:24
0
2
631

Node.js开发,使用mongoose还是mongojs?能否做下对比。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
巴扎黑

I have never used mongojs, but it seems to be similar to mongodb, which is a simple encapsulation of the MongoDB API.

My suggestion is that if it is an application, that is, a user-oriented project, such as a website, then use mongoose. mongoose is currently the best MongoDB ORM in Node.js. By pre-defining Schema, mongoose can help you complete part of the data verification and process control work, speeding up development.

If it is a library that may be referenced by other projects, I recommend using MongoDB’s native API directly, because in this case, the documents in the collection often do not have a specific pattern and cannot take advantage of the functions of mongoose. At the same time, there is usually less repetitive logic in the library than in the application, and using a simple API will provide greater flexibility.

伊谢尔伦

Just search on google, there are comparisons and answers to your questions on stackoverflow

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template