forked from mtusi2026/mtusi2026lab7
17 lines
355 B
TypeScript
17 lines
355 B
TypeScript
import { Global, Module } from '@nestjs/common';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
import { parseWorkerConfig } from './app-config.schema.js';
|
|
|
|
@Global()
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
isGlobal: true,
|
|
cache: true,
|
|
validate: parseWorkerConfig,
|
|
}),
|
|
],
|
|
exports: [ConfigModule],
|
|
})
|
|
export class WorkerConfigModule {}
|