Skip to content

Commit

Permalink
conexion a freesqldatabase.com
Browse files Browse the repository at this point in the history
  • Loading branch information
coxmau77 committed Jul 8, 2024
1 parent ab84bb3 commit 59124ed
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions db/bd_pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ const localConfig = {
queueLimit: 0
};

// Configuración de la conexión para despliegue
const deployConfig = {
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
port: process.env.DB_PORT,
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0
};
// // Configuración de la conexión para despliegue
// const deployConfig = {
// host: process.env.DB_HOST,
// user: process.env.DB_USER,
// password: process.env.DB_PASSWORD,
// database: process.env.DB_NAME,
// port: process.env.DB_PORT,
// waitForConnections: true,
// connectionLimit: 10,
// queueLimit: 0
// };

// Seleccionar la configuración correcta (local o despliegue)
// Seleccionar la configuración correcta (local o despliegue) // local : production
const config = process.env.NODE_ENV === 'production' ? deployConfig : localConfig;

// Crear el pool de conexiones con la configuración seleccionada
Expand Down

0 comments on commit 59124ed

Please sign in to comment.