1. Install dotenv Package
First, install dotenv, a package that loads environment variables from a .env file into process.env.
2. Create a .env File
Create a .env file in the root directory of your project and add environment-specific variables.
3. Load Environment Variables in server.js or app.js
4. Access Environment Variables