Lightning.Config.Bootstrap (Lightning v2.13.3)
View SourceBootstrap the application environment.
This module is responsible for setting up the application environment based on the configuration provided by the user.
Usually, config calls are made in the config/runtime.exs
file. This module
abstracts the runtime configuration into a module that can be tested and
called from other places (aside from config/runtime.exs
) file.
Sourcing envs
Internally this module uses Dotenvy.source/1
to source environment variables
from the .env
, .env.<config_env>
, and .env.<config_env>.override
files.
It also sources the system environment variables.
Calling configure/0
without calling source_envs/0
or Dotenvy.source/2
first will result in no environment variables being loaded.
Usage:
Lightning.Config.Bootstrap.source_envs()
Lightning.Config.Bootstrap.configure()
Summary
Functions
Retrieve a value nested in the application environment.