immich/server/src/bin/database.ts
mertalev 38a82d39d3
wip
2025-01-02 14:52:09 -05:00

12 lines
381 B
TypeScript

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.typeorm, host: 'localhost' });