Summary
Functions
Returns true when Hologram's runtime is enabled, false otherwise.
Returns the current environment.
Returns the secret key base.
Functions
@spec enabled?() :: boolean()
Returns true when Hologram's runtime is enabled, false otherwise.
Hologram is always enabled outside of the :dev and :test environments. In
:dev and :test it is disabled unless the HOLOGRAM_START environment
variable is set to "1" (as mix holo does). When disabled, Hologram's
supervision children are not started and Hologram.Router passes requests
straight through to the next plug instead of trying to serve them.
@spec env() :: atom()
Returns the current environment.
@spec secret_key_base() :: String.t()
Returns the secret key base.
Uses the SECRET_KEY_BASE env var when set. In :dev/:test, falls back to the
Phoenix endpoint's configured :secret_key_base. In all other environments the
env var is required.