2021-02-24 07:49:39 -05:00
|
|
|
defmodule Bones73k.Application do
|
2020-09-12 18:43:17 -04:00
|
|
|
# See https://hexdocs.pm/elixir/Application.html
|
|
|
|
# for more information on OTP Applications
|
|
|
|
@moduledoc false
|
|
|
|
|
|
|
|
use Application
|
|
|
|
|
|
|
|
def start(_type, _args) do
|
|
|
|
children = [
|
|
|
|
# Start the Ecto repository
|
2021-02-24 07:49:39 -05:00
|
|
|
Bones73k.Repo,
|
2020-09-12 18:43:17 -04:00
|
|
|
# Start the Telemetry supervisor
|
2021-02-24 07:49:39 -05:00
|
|
|
Bones73kWeb.Telemetry,
|
2020-09-12 18:43:17 -04:00
|
|
|
# Start the PubSub system
|
2021-02-24 07:49:39 -05:00
|
|
|
{Phoenix.PubSub, name: Bones73k.PubSub},
|
2020-09-12 18:43:17 -04:00
|
|
|
# Start the Endpoint (http/https)
|
2021-02-24 07:49:39 -05:00
|
|
|
Bones73kWeb.Endpoint
|
|
|
|
# Start a worker by calling: Bones73k.Worker.start_link(arg)
|
|
|
|
# {Bones73k.Worker, arg}
|
2020-09-12 18:43:17 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
# See https://hexdocs.pm/elixir/Supervisor.html
|
|
|
|
# for other strategies and supported options
|
2021-02-24 07:49:39 -05:00
|
|
|
opts = [strategy: :one_for_one, name: Bones73k.Supervisor]
|
2020-09-12 18:43:17 -04:00
|
|
|
Supervisor.start_link(children, opts)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Tell Phoenix to update the endpoint configuration
|
|
|
|
# whenever the application is updated.
|
|
|
|
def config_change(changed, _new, removed) do
|
2021-02-24 07:49:39 -05:00
|
|
|
Bones73kWeb.Endpoint.config_change(changed, removed)
|
2020-09-12 18:43:17 -04:00
|
|
|
:ok
|
|
|
|
end
|
|
|
|
end
|