Initial commit 050212

This commit is contained in:
2026-05-02 17:32:19 +03:30
commit 90e61458f7
8 changed files with 992 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import 'dotenv/config';
import { join } from 'path';
import { DataSource } from 'typeorm';
/**
* CLI-only DataSource (migration generate/run/revert).
* Paths point at src so migrations stay in TypeScript before build.
*/
export default new DataSource({
type: 'postgres',
host: process.env.DB_HOST,
port: parseInt(process.env.POSTGRES_PORT || '5432', 10),
username: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
database: process.env.POSTGRES_DB,
entities: [join(__dirname, '..', '**', '*.entity.ts')],
migrations: [join(__dirname, 'migrations', '*.ts')],
synchronize: false,
});
View File