1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-10 05:46:46 +01:00
immich/server/libs/infra/src/infra.module.ts

23 lines
570 B
TypeScript
Raw Normal View History

import { databaseConfig, UserEntity } from '@app/infra';
import { IUserRepository } from '@app/domain';
import { Global, Module, Provider } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserRepository } from './db';
const providers: Provider[] = [
//
{ provide: IUserRepository, useClass: UserRepository },
];
@Global()
@Module({
imports: [
//
TypeOrmModule.forRoot(databaseConfig),
TypeOrmModule.forFeature([UserEntity]),
],
providers: [...providers],
exports: [...providers],
})
export class InfraModule {}