Framework.Env (Framework v0.5.0)

View Source

Runtime environment helpers that avoid relying on Mix in release builds.

Falls back to :framework, :runtime_env configuration when Mix is not available (e.g., in production releases).

Summary

Functions

Returns the current runtime environment.

Convenience predicate for checking whether the runtime is considered test.

Functions

runtime_env()

@spec runtime_env() :: atom()

Returns the current runtime environment.

Uses Mix.env/0 when available (during development and test) and falls back to the configured runtime environment otherwise.

test?()

@spec test?() :: boolean()

Convenience predicate for checking whether the runtime is considered test.