async connect() {

        try {
        
            await connectMongooseToDatabase(process.env.URI_DATABASE);

        } catch (error) {

            /**
             * This process is critical if you do not connect the application, it will be closed!
             */
            console.error(`An error occurred when the api tried to connect to the database. Error : ${error}`);
            console.error('Closing the application...');
            process.exit(0)            
        }
    }
/**
     * Function for connecting in the Database.
     * 
     * --- 
     *      This process is critical, if an error occurs or an 
     *      invalid parameter is being sent, the application is 
     *      forced to close.
     * ---
     */
Function for connecting in the Database.

This process is critical, if an error occurs or an
invalid parameter is being sent, the application is
forced to close.
Function for connecting in the Database . This process is critical if an error occurs or an invalid parameter is being sent the application is forced to close .
async connect() {
        try {
            await connectMongooseToDatabase(process.env.URI_DATABASE);
        } catch (error) {
            console.error(`An error occurred when the api tried to connect to the database. Error : ${error}`);
            console.error('Closing the application...');
            process.exit(0)            
        }
    }
async connect ( ) { try { await connectMongooseToDatabase ( process . env . URI_DATABASE ) ; } catch ( error ) { console . error ( ` ${ error } ` ) ; console . error ( 'Closing the application...' ) ; process . exit ( 0 ) } }
Function for connecting in the Database.
Function for connecting in the Database .
/**
             * This process is critical if you do not connect the application, it will be closed!
             */