Update: Add console.log of MongoDB Version
This commit is contained in:
parent
de787919b1
commit
2bc7c968ef
1 changed files with 4 additions and 0 deletions
|
|
@ -20,6 +20,10 @@ db.mongoose
|
|||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true
|
||||
}, function (err){
|
||||
const admin = new db.mongoose.mongo.Admin(db.mongoose.connection.db);
|
||||
admin.buildInfo(function (err, info) {
|
||||
console.log("MongoDB Version: "+info.version);
|
||||
});
|
||||
if(err){
|
||||
console.log("Cannot connect to the database!", err);
|
||||
process.exit();
|
||||
|
|
|
|||
Reference in a new issue