Skip to content

Commit afb3937

Browse files
authored
Merge pull request #1369 from CVEProject/dr_dev_env
Trying to get more info out of this
2 parents dce32ad + c9085b3 commit afb3937

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ app.use((req, res, next) => {
5050
const dbConnectionStr = dbUtils.getMongoConnectionString()
5151
const dbConnectionOptions = dbUtils.getMongoConnectionOptions()
5252

53-
// First attempt: try connecting with authMechanism
5453
mongoose.connect(dbConnectionStr, dbConnectionOptions)
5554

5655
const db = mongoose.connection

src/utils/db.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ function getMongoConnectionString () {
3131
}
3232

3333
function getMongoConnectionOptions () {
34+
console.log(`Is Mongo being used: ${process.env.USEMONGO}`)
3435
if (process.env.USEMONGO !== undefined && booleanIsTrue(process.env.USEMONGO)) {
3536
return {
36-
tls: false
37+
tls: false,
38+
useNewUrlParser: true,
39+
useUnifiedTopology: true
3740
}
3841
}
3942
return {

0 commit comments

Comments
 (0)