This commit is contained in:
Amirhossein Mahmoodi
2024-07-29 16:03:34 +03:30
parent 0ad17d2c8c
commit d09567d9d5
19 changed files with 9443 additions and 194 deletions

View File

@@ -1,25 +1,25 @@
import { Module } from "@nestjs/common";
import { NotificationModule } from "./notifications/notification.module";
import { SequelizeModule } from "@nestjs/sequelize";
import { ConfigModule } from "@nestjs/config";
import { SocketModule } from "./socket/socket.module";
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { SocketModule } from './socket/socket.module';
import { NotificationModule } from './notifications/notification.module';
@Module({
imports: [
ConfigModule.forRoot(),
SequelizeModule.forRoot({
dialect: "mysql",
host: process.env.DB_HOST,
port: parseInt(process.env.DB_PORT),
username: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
autoLoadModels: true,
synchronize: true,
TypeOrmModule.forRoot({
type: 'postgres',
host: process.env.POSTGRES_HOST,
port: 5432,
ssl: process.env.POSTGRES_SSL === 'true',
username: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
database: process.env.POSTGRES_DATABASE,
entities: [__dirname + '/**/*.entity{.ts,.js}'],
synchronize: process.env.DB_SYNC === 'true',
}),
NotificationModule,
SocketModule,
NotificationModule,
],
})
export class AppModule {
}
export class AppModule {}