import { Module } from '@nestjs/common';
import { UserModule } from './users/users.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Users } from './entity/user.entity';

// 数据库连接池配置
@Module({
    imports: [
        TypeOrmModule.forRoot({
            type: "mssql",
            host: "106.54.219.245",
            port: 1433,
            username: "myh",
            password: "20231103#MS_Sql",
            database: "Elm",
            entities: [Users],
            synchronize: false,
            logging: false,
            "options": {
                "encrypt": false,
                "enableArithAbort": true
            }
        }),
        UserModule,
    ],
})

export class AppModule { }