Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import ENV from 'src/shared/env'; import { DataSource } from 'typeorm'; import { DatabaseDomain, POSTGRES_ACCOUNT_TOKEN } from '../../shared/database.const'; export const AccountDataSource = new DataSource({ type: 'postgres', name: DatabaseDomain.Account, host: ENV.POSTGRES.ACCOUNT.HOST, port: ENV.POSTGRES.ACCOUNT.PORT, username: ENV.POSTGRES.ACCOUNT.USERNAME, password: ENV.POSTGRES.ACCOUNT.PASSWORD, database: ENV.POSTGRES.ACCOUNT.DATABASE, schema: ENV.POSTGRES.ACCOUNT.SCHEMA, synchronize: false, migrationsTableName: 'migrations', migrations: [__dirname + '/migrations/*{.ts,.js}'], migrationsRun: ENV.POSTGRES.ACCOUNT.MIGRATIONS_RUN, migrationsTransactionMode: 'each', logger: 'advanced-console', connectTimeoutMS: ENV.POSTGRES.ACCOUNT.CONNECTION_TIMEOUT, maxQueryExecutionTime: ENV.POSTGRES.ACCOUNT.MAX_QUERY_EXECUTION_TIME, poolSize: ENV.POSTGRES.ACCOUNT.POOL_SIZE, entities: [__dirname + '/schemas/*{.ts,.js}'], }); export const AccountDatabaseProvider = { provide: POSTGRES_ACCOUNT_TOKEN, useFactory: () => AccountDataSource, }; |