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