defmodule HAHandler do @moduledoc """ This top-level module only contains generic configuration helpers. """ # Mix is not available in releases, and these things are static # anyway (@variables are evaluated at compile time). @otp_app Mix.Project.config()[:app] @version Mix.Project.config[:version] @env Mix.env def http_port, do: Application.get_env(@otp_app, :http_port) def haproxy_socket, do: Application.get_env(@otp_app, :haproxy_socket) def acme_challenge_path, do: Application.get_env(@otp_app, :acme_challenge_path) def static_path(), do: Application.app_dir(@otp_app, "priv/static/") def otp_app(), do: @otp_app def version(), do: @version def env(), do: @env end