Setup TypeORM

This commit is contained in:
Philipinho
2023-08-04 16:26:43 +01:00
parent 11018ea976
commit cebad0e0a5
23 changed files with 1018 additions and 70 deletions

View 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');
}
}