se creo el servicio para guardar participantes
This commit is contained in:
+28
-4
@@ -1,11 +1,35 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { ConfigModule, ConfigService } from '@nestjs/config'
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import { eventsModule } from './events/events.module';
|
||||
import { EventosModule } from './eventos/eventos.module';
|
||||
import { ParticipanteController } from './participante/participante.controller';
|
||||
import { ParticipanteModule } from './participante/participante.module';
|
||||
import { EventoParticipanteModule } from './evento-participante/evento-participante/evento-participante.module';
|
||||
|
||||
@Module({
|
||||
imports: [eventsModule],
|
||||
controllers: [AppController],
|
||||
imports: [
|
||||
ConfigModule.forRoot({isGlobal: true}),
|
||||
TypeOrmModule.forRoot({
|
||||
type: 'mariadb',
|
||||
host: 'localhost',
|
||||
port: 3306,
|
||||
username:'root',
|
||||
password: 'password',
|
||||
database: 'cedetec_proyectos',
|
||||
entities: [__dirname + '/**/*.entity{.ts,.js}'],
|
||||
synchronize: true
|
||||
}),
|
||||
EventosModule,
|
||||
ParticipanteModule,
|
||||
EventoParticipanteModule],
|
||||
controllers: [AppController, ParticipanteController],
|
||||
providers: [AppService],
|
||||
})
|
||||
export class AppModule {}
|
||||
export class AppModule {
|
||||
static port: number
|
||||
constructor(private readonly configService: ConfigService){
|
||||
AppModule.port = this.configService.get('PORT')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user