refactor(server): database config (#13730)

This commit is contained in:
Jason Rasmussen
2024-10-24 17:12:25 -04:00
committed by GitHub
parent 151ba9f1d9
commit fb995816a1
10 changed files with 87 additions and 84 deletions
+11
View File
@@ -0,0 +1,11 @@
import { ConfigRepository } from 'src/repositories/config.repository';
import { DataSource } from 'typeorm';
const { database } = new ConfigRepository().getEnv();
/**
* @deprecated - DO NOT USE THIS
*
* this export is ONLY to be used for TypeORM commands in package.json#scripts
*/
export const dataSource = new DataSource({ ...database.config, host: 'localhost' });