Answers for "typescript declare process.env"

2

.env typescript

npm install dotenv;
 OR 
yarn add dotenv;


import * as dotenv from 'dotenv';

//inside your starter code, do this
...
...
dotenv.config();
...
Posted by: Guest on August-14-2020
-1

typescript declare process.env

declare namespace NodeJS {  export interface ProcessEnv {    HOST: string;    DB_URL: string;    DB_NAME?: string;  }}
Posted by: Guest on September-03-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language