Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
♻️ Use .env data in configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Oct 31, 2020
1 parent b17c02a commit 170bc5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/config/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ConfigFactory } from '@nestjs/config/dist/interfaces';
import { Configuration } from './configuration.interface';
import { config } from 'dotenv';
import dotenvExpand from 'dotenv-expand';
dotenvExpand(config());

export const int = (val: string | undefined, num: number): number =>
val ? (isNaN(parseInt(val)) ? num : parseInt(val)) : num;
Expand Down

0 comments on commit 170bc5d

Please sign in to comment.