import mongoose from 'mongoose'

export const connectDB = async () => {
    console.log("connecting to database");
    try{
await mongoose.connect(process.env.MONGO_URI);
console.log("Connected to database");
    }catch(error){
console.log("Failed to connect to database");
    }
};