Skip to content

Commit 336627d

Browse files
committed
Clarify and link to config modules, closes #14533
1 parent 22467ab commit 336627d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/elixir/pages/mix-and-otp/config-and-releases.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ Configuration files provide a mechanism for us to configure the environment of a
5757

5858
* `config/config.exs` — this file is read at build time, before we compile our application and before we even load our dependencies. This means we can't access the code in our application nor in our dependencies. However, it means we can control how they are compiled
5959

60-
* `config/runtime.exs` — this file is read after our application and dependencies are compiled and therefore it can configure how our application works at runtime. If you want to read system environment variables (via `System.get_env/1`) or any sort of external configuration, this is the appropriate place to do so
60+
* `config/runtime.exs` — this file is read after our application and dependencies are compiled and therefore it can configure how our application works at runtime. If you want to read system environment variables (via `System.get_env/1`) or access external configuration, this is the appropriate place to do so
6161

62-
For example, we can configure IEx default prompt to another value. Let's create the `config/runtime.exs` file with the following content:
62+
You can learn more about configuration in the `Config` and `Config.Provider` modules. For now, let's see an example.
63+
64+
We can configure IEx default prompt to another value by creating a `config/runtime.exs` file with the following content:
6365

6466
```elixir
6567
import Config

lib/mix/lib/mix/tasks/release.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,8 @@ defmodule Mix.Tasks.Release do
626626
627627
### Runtime configuration
628628
629-
To enable runtime configuration in your release, all you need to do is
630-
to create a file named `config/runtime.exs`:
629+
To enable runtime configuration in your release, create a file named
630+
`config/runtime.exs`:
631631
632632
import Config
633633
config :my_app, :secret_key, System.fetch_env!("MY_APP_SECRET_KEY")

0 commit comments

Comments
 (0)