added connection to the dataBase

This commit is contained in:
2025-09-04 21:04:15 -04:00
parent 94973314d1
commit c3444b619a
13 changed files with 857 additions and 73 deletions
+16 -2
View File
@@ -1,10 +1,24 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './user/user.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { User } from './user/entities/user.entity';
@Module({
imports: [],
imports: [
TypeOrmModule.forRoot({
type: 'mysql',
host: 'localhost',
port: 3306,
username: 'root',
password: 'root',
database: 'test',
entities: [User],
synchronize: false,
}),
UserModule],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
export class AppModule { }