Simple way to Connect mongoDB with core Node.JS

suggest change
var MongoClient = require('mongodb').MongoClient;
  
  //connection with mongoDB
  MongoClient.connect("mongodb://localhost:27017/MyDb", function (err, db) {
        //check the connection
if(err){
         console.log("connection failed.");      
}else{
                  console.log("successfully connected to mongoDB.");
  });

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Connect to Mongodb:
* Simple way to Connect mongoDB with core Node.JS

Table Of Contents
1 npm
41 cli
43 grunt
49 Connect to Mongodb
59 Hack
64 ES6
67 Redis
69 MongoDB
86 MongoDB
87 Lodash
91 CORS
105 N-API
108 Require