import mongoose from "mongoose";

export const connectMongo = async (): Promise <void> => {

    try {

        await mongoose.connect(process.env.MONGO_URI!);
        console.log("MongoDB conectado");

    } catch(error){

        console.error("Error MongoDB", error);

        process.exit(1);

    }

};