fix(mongoose): Using useUnifiedTopology

This commit is contained in:
Chris Troutner
2020-01-07 17:48:50 -08:00
parent dddd0f43b6
commit e8edbed9c3
+7 -1
View File
@@ -24,7 +24,13 @@ async function startServer () {
// Connect to the Mongo Database.
mongoose.Promise = global.Promise
mongoose.set('useCreateIndex', true) // Stop deprecation warning.
await mongoose.connect(config.database, { useNewUrlParser: true })
await mongoose.connect(
config.database,
{
useUnifiedTopology: true,
useNewUrlParser: true
}
)
// MIDDLEWARE START