Files
docmost/server/src/environment/environment.service.ts
2023-08-04 16:26:43 +01:00

27 lines
650 B
TypeScript

import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
@Injectable()
export class EnvironmentService {
constructor(private configService: ConfigService) {}
getEnv(): string {
return this.configService.get<string>('NODE_ENV');
}
getPort(): string {
return this.configService.get<string>('PORT');
}
getDatabaseURL(): string {
return this.configService.get<string>('DATABASE_URL');
}
getJwtSecret(): string {
return this.configService.get<string>('JWT_SECRET_KEY');
}
getJwtTokenExpiresIn(): string {
return this.configService.get<string>('JWT_TOKEN_EXPIRES_IN');
}
}