ExEnv v0.3.1 ExEnv View Source

Tool provides support of Elixir terms in system env variables. For security reasons only literals/terms are allowed in configs (no functions, macros, modules etc).

Link to this section Summary

Functions

Works as Mix.Config.Config macro. Gets single argument, name of otp_app (atom). Infers config system variable name from otp_app argument: capitalize name and adds _CONFIG postfix

Works as &ExEnv.config/1 macro, but second argument is explicit system variable name

Link to this section Functions

Link to this macro config(otp_app_ast) View Source (macro)

Works as Mix.Config.Config macro. Gets single argument, name of otp_app (atom). Infers config system variable name from otp_app argument: capitalize name and adds _CONFIG postfix.

Example

  # reads, validates and evaluates BEST_APP_CONFIG system variable
  ExEnv.config(:best_app)
Link to this macro config(otp_app_ast, os_var_name_ast) View Source (macro)

Works as &ExEnv.config/1 macro, but second argument is explicit system variable name.

Example

  # reads, validates and evaluates MY_FAVORITE_APP_DATA system variable
  ExEnv.config(:best_app, "MY_FAVORITE_APP_DATA")