import { readFileSync } from 'fs' ; import { parse } from 'dotenv' ; export class EnvService { private readonly config : { [ key ] : string ; } ; constructor ( path ) { this . config = parse ( readFileSync ( path ) ) ; } public get ( key ) { return this . config [ key ] ; } }