mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 17:31:09 +10:00
Setup TypeORM
This commit is contained in:
26
server/src/environment/environment.service.ts
Normal file
26
server/src/environment/environment.service.ts
Normal file
@ -0,0 +1,26 @@
|
||||
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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user