1
0
mirror of https://github.com/microsoft/TypeScript-Node-Starter.git synced 2025-11-08 14:47:28 +00:00

Using template literals for mongodb error message (#298)

thx to @NyashaNziramasanga
This commit is contained in:
Nyasha (Nash) Nziramasanga
2020-07-14 06:01:14 +09:30
committed by GitHub
parent ee9e040e8e
commit e5d191f223

View File

@@ -33,7 +33,7 @@ mongoose.Promise = bluebird;
mongoose.connect(mongoUrl, { useNewUrlParser: true, useCreateIndex: true, useUnifiedTopology: true } ).then(
() => { /** ready to use. The `mongoose.connect()` promise resolves to undefined. */ },
).catch(err => {
console.log("MongoDB connection error. Please make sure MongoDB is running. " + err);
console.log(`MongoDB connection error. Please make sure MongoDB is running. ${err}`);
// process.exit();
});