feature/integracion-cloudrestore-targets (#9)

integraciones para cloud recovery

Reviewed-on: #9
Co-authored-by: hreyes <hreyes@aduanasoft.com.mx>
Co-committed-by: hreyes <hreyes@aduanasoft.com.mx>
This commit is contained in:
2026-06-09 14:58:48 +00:00
committed by acazares
parent 3e5557c034
commit b8be307892
30 changed files with 2426 additions and 67 deletions

View File

@@ -7,13 +7,19 @@ import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const pgPassword = process.env.DB_POSTGRES_PASS;
if (!pgPassword) {
console.error('❌ Falta variable de entorno DB_POSTGRES_PASS. Copia .env.example → .env y configura el valor.');
process.exit(1);
}
// Configuración de PostgreSQL (Docker local)
const pool = new Pool({
host: 'localhost',
port: 5432,
database: 'CONTROLDESK',
user: 'postgres',
password: 'Control.',
host: process.env.DB_POSTGRES_HOST || 'localhost',
port: Number(process.env.DB_POSTGRES_PORT) || 5432,
database: process.env.DB_POSTGRES_DB || 'CONTROLDESK',
user: process.env.DB_POSTGRES_USER || 'postgres',
password: pgPassword,
max: 1
});