27 lines
907 B
TypeScript
27 lines
907 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { PassportModule } from '@nestjs/passport';
|
|
import { AuthService } from './auth.service';
|
|
import { jwtStrategy } from './jwt.strategy';
|
|
import { AuthController } from './auth.controller';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { JwtModule } from '@nestjs/jwt';
|
|
import { jwtConstants } from './jwt.constants';
|
|
import { MiembroModule } from 'src/miembro/miembro.module';
|
|
import { MiembroService } from 'src/miembro/miembro.service';
|
|
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
|
|
|
@Module({
|
|
imports: [
|
|
MiembroModule,
|
|
PassportModule,
|
|
TypeOrmModule.forFeature([Miembro]),
|
|
JwtModule.register({
|
|
secret: jwtConstants.secret,
|
|
signOptions: { expiresIn: '5h' },
|
|
}),
|
|
],
|
|
providers: [AuthService, jwtStrategy, MiembroService, jwtStrategy],
|
|
controllers: [AuthController],
|
|
})
|
|
export class AuthModule {}
|