const connectDB = async () => {
try {
await mongoose.connect(uri, { useUnifiedTopology: true}, function(error){
if(error){return console.log(error);}
app.listen(3001)
} );
console.log(`Mongo db connected`);
} catch (error) {
console.log(error);
process.exit(1);
}
}