mirror of
https://github.com/docmost/docmost.git
synced 2026-05-10 16:24:05 +08:00
d4eefa48a8
* set log level based on env
21 lines
531 B
TypeScript
21 lines
531 B
TypeScript
import { Global, Module } from '@nestjs/common';
|
|
import { EnvironmentService } from './environment.service';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
import { validate } from './environment.validation';
|
|
import { envPath } from '../../common/helpers';
|
|
|
|
@Global()
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
isGlobal: true,
|
|
expandVariables: true,
|
|
envFilePath: envPath,
|
|
validate,
|
|
}),
|
|
],
|
|
providers: [EnvironmentService],
|
|
exports: [EnvironmentService],
|
|
})
|
|
export class EnvironmentModule {}
|