TO SETUP EVIRONMENTAL VARIABLES FOLLOW THE STEPS BELOW
- Ensure all dependencies are installed by running the command `npm install` in the terminal
- Create files `.env, .env.example` in the root of the project.
- Enter your variable name(UPPERCASE) in the following format in the `.env` file
`ENVIRONMENT_VARIABLE_NAME=value`
- Enter only your variable name(UPPERCASE) and assignment operator in `.env.example` file
ENVIRONMENT_VARIABLE_NAME=
- Ensure not to put in values in the .env.example file, as this will be made public
TO RETRIEVE EVIRONMENTAL VARIABLES FOLLOW THE STEPS BELOW
To use access the value in an environment variable, simply use the syntax `proces.env.<ENVIRONMENT_VARIABLE_NAME>` to retrieve the value of that variable
Example process.env.secret