HOW TO ADD DOTENV code example
Example 1: node dotenv
require('dotenv').config();
console.log(process.env.MY_ENV_VAR);
Example 2: how to use dotenv in javascript
dotenv file use
Example 3: .env tutorial
const express = require('express');const app = express();const port = process.env.PORT || 3000;require('dotenv').config();app.get('/', (req, res) => { res.send(process.env.SECRET_KEY);})app.listen(port, () => { console.log(`Server is running on port ${port}.`)})