create simpel login
This commit is contained in:
+9
-1
@@ -12,6 +12,9 @@ import { EjeEstrategico } from './entities/ejesEstrategicos.entity';
|
||||
import { LineaProgramatica } from './entities/LineaProgramatica.entity';
|
||||
import { TipoUsuarioEntity } from './entities/tipoUsuario.entity';
|
||||
import { UsuarioEntity } from './entities/usuario.entity';
|
||||
import { UsuarioController } from './usuario/usuario.controller';
|
||||
import { JwtModule } from '@nestjs/jwt';
|
||||
import * as process from "node:process";
|
||||
config({ path: '.env' });
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -37,8 +40,13 @@ config({ path: '.env' });
|
||||
UsuarioEntity,
|
||||
],
|
||||
}),
|
||||
JwtModule.register({
|
||||
global: true,
|
||||
secret: process.env.JWT_SECRET,
|
||||
signOptions: { expiresIn: process.env.JWT_EXPIRES },
|
||||
}),
|
||||
],
|
||||
controllers: [AppController],
|
||||
controllers: [AppController, UsuarioController],
|
||||
providers: [AppService],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
||||
Reference in New Issue
Block a user