mongodb deprecated warnings
mongoose.connect(process.env.DATABASE, {
useNewUrlParser: true,
useCreateIndex: true,
useFindAndModify: false,
useUnifiedTopology: true,
})
.then(() => {
console.log("DB connected");
})
.catch((err) => console.log(`DB connection Err`, err));