Current section

Files

Jump to
logger_telegram_backend lib telegram_logger_backend application.ex
Raw

lib/telegram_logger_backend/application.ex

defmodule LoggerTelegramBackend.Application do
@moduledoc false
use Application
alias LoggerTelegramBackend.Config
@impl true
def start(_type, _opts) do
children =
case Config.client().child_spec() do
nil -> []
client -> [client]
end
Supervisor.start_link(children,
strategy: :one_for_one,
name: LoggerTelegramBackend.Supervisor
)
end
end