Node.js development, using mongoose or mongojs? Can you make a comparison?
Mongojs has not been used, but it looks likemongodbIt should be the same, that is, the simple encapsulation of MongoDB API.
My suggestion is that if it is an application, that is, a user-oriented project, such as a website, Mongoose is the best MongoDB ORM in Node.js at present. By defining schema in advance, Mongoose can help you complete part of data verification and process control and speed up development.
If it is a library that may be referenced by other projects, I suggest 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 mongoose’s functions. At the same time, there is usually less repetitive logic in the library than in the application, and using a simple API will have higher flexibility.