/////////////////////////////////////////////////
// APPELS DES MODULES
/////////////////////////////////////////////////
const mysql_promise = require('mysql2/promise');

////////////////////////////////////////////////////
// CONNECTION DB
////////////////////////////////////////////////////
async function connect_DB_promise() {
    return mysql_promise.createConnection({
        host: process.env.db_connection_host,
        port: process.env.db_connection_port,
        user: process.env.db_connection_user,
        password: process.env.db_connection_password,
        database: process.env.db_connection_database
    });
}

module.exports = { connect_DB_promise };