Closed lpil closed 9 years ago
Jonny says:
Can we get something .env-like?
Louis says:
What's the advantage of .env? I've not played with it.
In development I want to be able to run mix
with the Github access token on my machine. Rather than do GITHUB_ACCESS_KEY=key-key-key mix
, I want to just be able to run mix
, specify my environment in a .env file, and go.
This becomes especially important when we get more environment variables.
I think there's an established way to do this sort of thing with OTP, but I'm not sure what it is yet. I don't think .env really fits in with OTP + mix, but I'm probably wrong.
A thread that might be interesting -> https://groups.google.com/forum/#!topic/elixir-lang-core/SLlJxiMa-7Q
System.get_env("MY_VAR") || Application.get_env(:myapp, :my_var) || some_default
This looks sensible.
Looks like a macro to me ;)
Possibly. Happy to put this into master?
Yep, fire away.
Rebased it, but github didn't notice. Guess it's a bug on their end.
https://github.com/reevoo/samuel/issues/19
http://12factor.net/