Update: Add console.log of MongoDB Version

This commit is contained in:
Yûki VACHOT 2021-12-14 13:55:07 +01:00
parent de787919b1
commit 2bc7c968ef

View file

@ -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();