diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-08-08 08:45:15 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-08-08 08:45:15 -0400 |
| commit | 7ccdb63fb7f4008b7d785c687b4f55b6b4291483 (patch) | |
| tree | b1c342020429e1b4acf4d8d1e84fde26e4a4d3f8 /config/runtime.exs | |
| parent | 5b639185cca5a2d1dc18c99699065e8a5623dbf1 (diff) | |
adding and posting images working
Diffstat (limited to 'config/runtime.exs')
| -rw-r--r-- | config/runtime.exs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/config/runtime.exs b/config/runtime.exs index becde76..0204d77 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -1 +1,16 @@ import Config +import Dotenv + +if config_env() != :prod do + Dotenv.load!() +end + +if is_nil(Application.get_env(:thulani, Thulani.Repo)) do + db_url = System.get_env("DATABASE_URL") + config :thulani, Thulani.Repo, url: db_url +end + +if is_nil(Application.get_env(:nostrum, :token)) do + discord_token = System.get_env("DISCORD_TOKEN") + config :nostrum, token: discord_token +end |
