Final fix for backend structure and API launch

This commit is contained in:
Hamza-Ayed
2026-04-17 00:38:41 +03:00
parent 59ff15b809
commit b818b05a84
2 changed files with 3 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
/**
* ════════════════════════════════════════════════════════════
* مُصادَق — TypeORM CLI Data Source
* ════════════════════════════════════════════════════════════
*/
import { DataSource } from 'typeorm';
import * as dotenv from 'dotenv';
dotenv.config();
export const AppDataSource = new DataSource({
type: 'postgres',
host: process.env.DB_HOST,
port: parseInt(process.env.DB_PORT || '5300'),
username: process.env.DB_USER,
password: process.env.DB_PASS,
database: process.env.DB_NAME,
synchronize: false,
logging: true,
entities: ['src/**/entities/*.entity.ts'],
migrations: ['src/migrations/*.ts'],
subscribers: [],
});