dwyl / dwyl/learn-phoenix

Information on Environment Variables

Open
#104 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
664
Forks
41
PR merge metrics
No merged PRs in 30d

Description

When playing with Phoenix @finnhodgkin and I have found the need to use Environment Variables, which we tussled a little bit with.

The `System` module allows us to get Environment Variables by keys, like so: `System.get_env("my_api_key")`

You can set the Environment Variables with the `source` bash command, but this has to be re-run in every new instance of a shell, which isn't ideal.

The [`Envy`](https://github.com/BlakeWilliams/envy) Elixir module solves this problem and was quite simple to set up (even for a Phoenix noob like myself).

I think a small section on how to set up Envy and use Environment Variables would be a good addition to this repo, since using Environment Variables to hide secret stuff is super important!

I'm super happy to make a PR doing so if the community think it would be a good addition!

Contributor guide

Open the contributing guide

Research direction

Locate the repository's existing Phoenix setup or configuration documentation and review the shown System.get_env/Envy examples. Add a concise section explaining how to set up Envy and use environment variables for secrets, then verify that the guidance fits the surrounding documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, elixir
Domain
documentation, security
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.