.env -typeScript
npm install dotenv;
OR
yarn add dotenv;
import * as dotenv from 'dotenv';
//inside your starter code, do this
...
...
dotenv.config();
...
DevPedrada
npm install dotenv;
OR
yarn add dotenv;
import * as dotenv from 'dotenv';
//inside your starter code, do this
...
...
dotenv.config();
...
declare namespace NodeJS { export interface ProcessEnv { HOST: string; DB_URL: string; DB_NAME?: string; }}