added folder student and create new Ep Login

This commit is contained in:
2025-09-09 21:19:17 -04:00
parent c3444b619a
commit d73c0cf4e7
20 changed files with 245 additions and 134 deletions
+22 -12
View File
@@ -1,24 +1,34 @@
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './user/user.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { StudentModule } from './student/student.module';
import { UserModule } from './user/user.module';
import { User } from './user/entities/user.entity';
@Module({
imports: [
TypeOrmModule.forRoot({
type: 'mysql',
host: 'localhost',
port: 3306,
username: 'root',
password: 'root',
database: 'test',
entities: [User],
synchronize: false,
ConfigModule.forRoot({
isGlobal: true,
envFilePath: '.env',
}),
UserModule],
TypeOrmModule.forRootAsync({
inject: [ConfigService],
useFactory: async (configService: ConfigService) => ({
type: 'mariadb',
host: configService.get<string>('DB_HOST'),
port: configService.get<number>('DB_PORT'),
username: configService.get<string>('DB_USER'),
password: configService.get<string>('DB_PASSWORD'),
database: configService.get<string>('DB_NAME'),
entities: [User],
synchronize: false,
}),
}),
UserModule,
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule { }
export class AppModule {}