mongoose.connect(process.env.MONGODB_URI, { useNewUrlParser: true, useCreateIndex: true, }); code example
Example: mongoose.connect(process.env.MONGODB_URI, { useNewUrlParser: true, useCreateIndex: true, });
mongoose.connect('mongodb://username:password@host:port/database?options...', {useNewUrlParser: true});