ultima versión
This commit is contained in:
+13
-7
@@ -2,10 +2,11 @@ import { Module } from '@nestjs/common';
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import { MailModule } from './mail/mail.module';
|
||||
import {ExcelModule} from './excel/excel.module'
|
||||
import { ExcelModule } from './excel/excel.module'
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { SistemaModule } from './sistema/sistema.module';
|
||||
import { JwtModule } from '@nestjs/jwt';
|
||||
|
||||
|
||||
|
||||
@@ -13,11 +14,16 @@ import { SistemaModule } from './sistema/sistema.module';
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot(
|
||||
{isGlobal: true}
|
||||
{ isGlobal: true }
|
||||
),
|
||||
|
||||
|
||||
JwtModule.register({
|
||||
secret: process.env.JWT_SECRET,
|
||||
|
||||
}),
|
||||
|
||||
TypeOrmModule.forRoot({
|
||||
type: 'mysql',
|
||||
type: 'mysql',
|
||||
host: process.env.db_host,
|
||||
username: process.env.db_username,
|
||||
database: process.env.db_database,
|
||||
@@ -27,9 +33,9 @@ import { SistemaModule } from './sistema/sistema.module';
|
||||
dropSchema: false, // elimina la base de datos
|
||||
// logging: true, // Habilita los logs para depuración
|
||||
autoLoadEntities: true, // Carga automáticamente las entidades
|
||||
|
||||
|
||||
}),
|
||||
|
||||
|
||||
MailModule,
|
||||
ExcelModule,
|
||||
SistemaModule,
|
||||
@@ -39,4 +45,4 @@ import { SistemaModule } from './sistema/sistema.module';
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
})
|
||||
export class AppModule {}
|
||||
export class AppModule { }
|
||||
|
||||
Reference in New Issue
Block a user