From e5d191f22331a37a988b07d5feea04cb6e10d7e9 Mon Sep 17 00:00:00 2001 From: "Nyasha (Nash) Nziramasanga" <47994666+NyashaNziramasanga@users.noreply.github.com> Date: Tue, 14 Jul 2020 06:01:14 +0930 Subject: [PATCH] Using template literals for mongodb error message (#298) thx to @NyashaNziramasanga --- src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 36e33a1..f41c158 100644 --- a/src/app.ts +++ b/src/app.ts @@ -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(); });