Good morning everyone , i tried to create a new data base with mangodb version msi 6.0 i made this code below:
var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/mydb";
MongoClient.connect(url, function(err, db) {
if (err) throw err;
console.log("Database created!");
db.close();
});
the first error is about MongooseServerSelectionError: connect ECONNREFUSED localhost:27017` i changed the local host with the ip adress 127.0.0.1 NOW IT DOES NOT SHOW ANY ERROR BUT THE PROCESS TAKE UNLIMITED TIME !!! THAKS!!!
Solution for the UNLIMITED TIME EXECUTION PROBLEM