Hi, I am doing a phoenix app that uses erlang odbc
I want to boot the erlang odbc application (:odbc.start()) when starting the phoenix app. My understanding is that the way to do it is to add it to the supervised children
Something like the following
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
Alerts.Repo,
supervisor(:odbc, []),
supervisor(AlertsWeb.Endpoint, []),
if(System.get_env() != :test, do: Alerts.Scheduler)
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Alerts.Supervisor]
Supervisor.start_link(children, opts)
end
What kind of children specification should I provide?
Thanks