new structure whit other database
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { TypeOrmModuleAsyncOptions } from '@nestjs/typeorm';
|
||||
import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||
|
||||
export const dbAT: TypeOrmModuleAsyncOptions = {
|
||||
name: 'dbAT',
|
||||
imports: [ConfigModule],
|
||||
inject: [ConfigService],
|
||||
useFactory: async (config: ConfigService) => ({
|
||||
type: 'mariadb',
|
||||
host: config.get<string>('DB_AT_HOST'),
|
||||
port: config.get<number>('DB_AT_PORT'),
|
||||
username: config.get<string>('DB_AT_USER'),
|
||||
password: config.get<string>('DB_AT_PASSWORD'),
|
||||
database: config.get<string>('DB_AT_NAME'),
|
||||
entities: [],
|
||||
synchronize: false,
|
||||
}),
|
||||
};
|
||||
Reference in New Issue
Block a user