In JavaScript projects, I used to use dotenv so that I could put local environment variables in a .env
file for local development. But dotenv requires you to add code to your project.
With direnv, you can put local env vars in a .envrc file and those env vars are loaded automatically in the shell.
For these steps, it is assummed that you have installed Git Bash on Windows. I also use VSCode as my editor.
- Create a folder such as
c:\tools
to put thedirenv.exe
file and add it to the Windows PATH