Top "Node-mongodb-native" questions

The MongoDB Native Node.

Fail to connect Mongoose to Atlas

I'm always connecting to the "admin" DB, which is a fixed bug. Using Mongoose 5.0.6 MongoDb 3.6 and trying to connect to …

node.js mongodb mongoose node-mongodb-native mongodb-atlas
node.js mongodb how to connect to replicaset of mongo servers

I am using mongo and node.js in an application. The mongo database consists of two servers. In the example …

node.js mongodb node-mongodb-native
MongoError: there are no users authenticated

I'm trying to write a script to add an admin user and a generic user to the MongoDB database using …

node.js mongodb mongoose node-mongodb-native
What is best way to handle global connection of Mongodb in NodeJs

I using Node-Mongo-Native and trying to set a global connection variable, but I am confused between two possible solutions. Can …

node.js mongodb express node-mongodb-native
Handle lost connection to mongo db from nodejs

I'm trying to get "connection lost" or something similar when connection lost between nodejs and mongodb server. I use native …

node.js mongodb connection timeout node-mongodb-native
ReferenceError: require is not defined in MongoDB shell

I try to connect MongoDB from Mongo client on windows command (Window 8.1). When I use require() in javascript, I have …

mongodb shell require node-mongodb-native
Using the find method on a MongoDB collection with Monk

I am working through a MEAN stack tutorial. It contains the following code as a route in index.js. The …

node.js mean-stack node-mongodb-native monk
Mongoose: How to populate 2 level deep population without populating fields of first level? in mongodb

Here is my Mongoose Schema: var SchemaA = new Schema({ field1: String, ....... fieldB : { type: Schema.Types.ObjectId, ref: 'SchemaB' } }); var SchemaB = …

node.js mongodb mongoose node-mongodb-native
How to reuse mongodb connection in node.js

I'm using node-mongodb-native driver with mongodb to write a website. I have a question about how to open mongodb connection …

node.js node-mongodb-native
Handling MongoDB disconnect/reconnects from Node

When my MongoDB connection is idle for a few minutes, the next request ends in error. From the mongo command …

node.js mongodb mlab node-mongodb-native