security: remove hardcoded DB credentials from code files

This commit is contained in:
AyrisAI
2026-07-23 17:58:07 +03:00
parent a2d6cf653d
commit f67afd32da
3 changed files with 13 additions and 9 deletions
+5 -3
View File
@@ -7,9 +7,11 @@ const globalForPrisma = globalThis as unknown as {
};
function createPrismaClient(): PrismaClient {
const connectionString =
process.env.DATABASE_URL ||
'postgres://postgres:mBTWE2cDKGExtpktguD3HPe8y9Xr9kWFYdxV4WHQKISLLGoBAS4UdtfSCfXwvPpq@65.109.236.58:37298/postgres';
const connectionString = process.env.DATABASE_URL;
if (!connectionString) {
throw new Error('[DB] DATABASE_URL environment variable is not set!');
}
const pool = new Pool({ connectionString });
const adapter = new PrismaPg(pool);