2025-09-04 20:17:04 -04:00
|
|
|
import { Module } from '@nestjs/common';
|
|
|
|
|
import { AppController } from './app.controller';
|
|
|
|
|
import { AppService } from './app.service';
|
2025-09-04 21:04:15 -04:00
|
|
|
import { UserModule } from './user/user.module';
|
|
|
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
|
|
|
import { User } from './user/entities/user.entity';
|
2025-09-04 20:17:04 -04:00
|
|
|
|
|
|
|
|
@Module({
|
2025-09-04 21:04:15 -04:00
|
|
|
imports: [
|
|
|
|
|
TypeOrmModule.forRoot({
|
|
|
|
|
type: 'mysql',
|
|
|
|
|
host: 'localhost',
|
|
|
|
|
port: 3306,
|
|
|
|
|
username: 'root',
|
|
|
|
|
password: 'root',
|
|
|
|
|
database: 'test',
|
|
|
|
|
entities: [User],
|
|
|
|
|
synchronize: false,
|
|
|
|
|
}),
|
|
|
|
|
UserModule],
|
2025-09-04 20:17:04 -04:00
|
|
|
controllers: [AppController],
|
|
|
|
|
providers: [AppService],
|
|
|
|
|
})
|
2025-09-04 21:04:15 -04:00
|
|
|
export class AppModule { }
|