Skip to content

Commit

Permalink
remove mongoose's connection options. (#346)
Browse files Browse the repository at this point in the history
(useNewUrlParser, useCreateIndex, useUnifiedTopology are default true, and useFindAndModify is false)
ref: https://mongoosejs.com/docs/migrating_to_6.html#no-more-deprecation-warning-options
  • Loading branch information
mayaeh authored Nov 9, 2021
1 parent d5fbaca commit 5e1f7fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ShortLink from './models/short-link'

// Connect to the MongoDB database
const databaseURL = process.env.MONGODB_URI || 'mongodb://localhost/nazrin'
mongoose.connect(databaseURL, { useNewUrlParser: true, useCreateIndex: true, useFindAndModify: false, useUnifiedTopology: true }).catch((err) => {
mongoose.connect(databaseURL).catch((err) => {
console.error(err)
})

Expand Down

0 comments on commit 5e1f7fe

Please sign in to comment.