Enable setting config securely in firmware/config/secrets.exs
This commit is contained in:
parent
fe172f018a
commit
8f99154259
7 changed files with 17 additions and 15 deletions
1
morse/.gitignore
vendored
1
morse/.gitignore
vendored
|
@ -21,4 +21,3 @@ erl_crash.dump
|
|||
|
||||
# Ignore package tarball (built via "mix hex.build").
|
||||
morse-*.tar
|
||||
|
||||
|
|
|
@ -21,12 +21,7 @@ defmodule Morse do
|
|||
"""
|
||||
|
||||
def signal do
|
||||
case System.get_env("MORSE_MESSAGE") do
|
||||
nil ->
|
||||
# Signal for SOS if the env variable wasn't found :)
|
||||
signal("...---...")
|
||||
message -> signal(message)
|
||||
end
|
||||
signal(Application.fetch_env!(:morse, :morse_message))
|
||||
end
|
||||
|
||||
def signal(symbols) do
|
||||
|
|
|
@ -14,7 +14,8 @@ defmodule Morse.MixProject do
|
|||
# Run "mix help compile.app" to learn about applications.
|
||||
def application do
|
||||
[
|
||||
extra_applications: [:logger]
|
||||
extra_applications: [:logger],
|
||||
env: [morse_message: "...---..."]
|
||||
]
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue