mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 14:31:11 +10:00
27 lines
650 B
TypeScript
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');
|
|
}
|
|
}
|