So verwenden Sie Dotenv in JavaScript
#in you cmd type this command
npm i dotenv
#and then require it in you javascript using :
require("dotenv").config()
ParthRangarajan
#in you cmd type this command
npm i dotenv
#and then require it in you javascript using :
require("dotenv").config()
npm install dotenv
this module is used to access environment variable in our application
This is used to add a specific path to locate the .env file if we use like this
.config() then this is finding .env file in our cwd - current working directory.
require('dotenv').config({ path: '/custom/path/to/.env' })