adding app config and auth modules
This commit is contained in:
21
libs/modules/src/auth/auth.module.ts
Normal file
21
libs/modules/src/auth/auth.module.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Module, DynamicModule } from '@nestjs/common';
|
||||
import { AuthService } from './auth.service';
|
||||
import { AuthOptions } from './auth.interface';
|
||||
import { AUTH_OPTIONS } from './auth.constants';
|
||||
|
||||
@Module({})
|
||||
export class AuthModule {
|
||||
static register(options: AuthOptions): DynamicModule {
|
||||
return {
|
||||
module: AuthModule,
|
||||
providers: [
|
||||
{
|
||||
provide: AUTH_OPTIONS,
|
||||
useValue: options
|
||||
},
|
||||
AuthService
|
||||
],
|
||||
exports: [AuthService]
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user