Top "Mongoose" questions

Mongoose is a MongoDB object modeling tool, or ODM (Object Document Mapper), written in JavaScript and designed to work in an asynchronous environment.

How to get Schema of mongoose database which defined in another model

This is my folder structure: +-- express_example |---- app.js |---- models |-------- songs.js |-------- albums.js |---- …

javascript node.js mongodb mongoose nosql
(node:63208) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead

Where is this error coming from? I am not using ensureIndex or createIndex in my Nodejs application anywhere. I am …

node.js mongodb mongoose
Check mongoose connection state without creating new connection

I have some tests - namely Supertest - that load my Express app. This app creates a Mongoose connection. I …

node.js mongoose
is there a mongoose connect error callback

how can i set a callback for the error handling if mongoose isn't able to connect to my DB? i …

javascript mongodb node.js mongoose
Mongoose: how to use aggregate and find together

How can I use aggregate and find together in Mongoose? i.e I have the following schema: const schema = new …

node.js mongodb mongoose mongodb-query aggregation-framework
mongoose vs mongodb (nodejs modules/extensions), which better? and why?

I've just arrived to Node.js and see that there are many libs to use with the MongoDB, the most …

javascript node.js mongodb mongoose
MongoDB connection error: MongoTimeoutError: Server selection timed out after 30000 ms

I am trying to create a fullstack app reading the following tutorial: https://medium.com/javascript-in-plain-english/full-stack-mongodb-react-node-js-express-js-in-one-simple-app-6cc8ed6de274 …

node.js mongoose mongodb-atlas
DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead?

I am using mongoose findOneAndUpdate but still getting the error, DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete …

node.js mongodb mongoose deprecated
Delete document using findOneAndRemove Mongoose

I am receiving this error when trying to delete a document from the database: Cannot GET /delete/532fa5e56f885…

node.js mongodb mongoose pug node.js-connect
Best way to perform a full text search in MongoDB and Mongoose

I'm searching on Google since days and I tried many things but I still can not perform a good full …

javascript node.js mongodb express mongoose