I'm using mongodb with Node.js and I make my connection as follows:
var mongoClient = new MongoClient(new Server("localhost", 27017,
{ native_parser: true }
));
mongoClient.open(function (err, mongoclient) {
db = mongoclient.db('mydb');
});
As it is clear It requires no password, My concern is that how to set up password with mongodb and when I try to make connection then It should require password. How to do it?