It was suggested to me to utilize ZSH for storing environment variables for a project I'm working on. When I set them with export VAR_NAME='secret_key'
on the command line it works, but does not persist beyond that shell session.
Reading around it sounds like I should be adding them in a .zshenv
file. That file does not appear to exist for me. Not sure how where to create that file in my $PATH. Contrary to that approach I was told just to use my .zshrc
file. Though when I add my env vars in there export VAR_NAME='secret_key'
they are not picked up by my application like they were when I ran that syntax from the command line.
I'm kinda lost in what is the best approach for this, and how to get it done.
Couple resources I've been reading though: