← Back to Upcase

Environment Variables in .zshrc

(Edward Loveall) #1

I’ve seen environment variables like ENV['POSTGRES_USERNAME'] used pretty intelligently in some rails apps. Here or here for example.

Is there any reason to not keep environment variables in my .zshrc so I can keep these versioned / tracked / synced? Obviously something like $MASTER_PASSWORD would be bad, but is there any reason not to keep public strings there?

(Chad Pytel) #2

I suppose it’s ok, but I’m having a hard time thinking of something that you’d want to put there. Do you have a real-world example?

(Edward Loveall) #3

One example would be the username in the Feedbin database config but I’m picturing having a few standard values like local insecure app passwords for testing, database urls, service urls (e.x. elastic search), etc.