Files
Picsur/src/app.module.ts

28 lines
701 B
TypeScript
Raw Normal View History

2022-02-21 10:46:03 +01:00
import { Module } from '@nestjs/common';
2022-02-21 14:53:21 +01:00
import { TypeOrmModule } from '@nestjs/typeorm';
import { AuthModule } from './auth/auth.module';
import { UserEntity } from './users/user.entity';
import { UsersModule } from './users/users.module';
import Config from './env';
2022-02-21 10:46:03 +01:00
@Module({
2022-02-21 14:53:21 +01:00
imports: [
TypeOrmModule.forRoot({
type: 'postgres',
host: Config.database.host,
port: Config.database.port,
username: Config.database.username,
password: Config.database.password,
database: Config.database.database,
autoLoadEntities: true,
synchronize: true,
entities: [UserEntity],
}),
AuthModule,
UsersModule,
],
2022-02-21 10:46:03 +01:00
})
export class AppModule {}