Packages
legendary_core
7.17.2
8.12.0
8.11.1
8.11.0
8.10.0
8.9.2
8.9.1
8.5.3
8.5.2
8.5.1
8.5.0
8.4.0
8.3.6
8.3.5
8.3.4
8.3.3
8.3.2
8.3.1
8.3.0
8.2.7
8.2.5
8.2.4
8.2.3
8.2.2
8.2.1
8.2.0
8.1.1
8.1.0
8.0.1
8.0.0
7.17.12
7.17.8
7.17.7
7.17.6
7.17.5
7.17.4
7.17.3
7.17.2
7.17.1
7.17.0
7.16.12
7.16.11
4.5.4
4.0.0
2.12.0
2.11.5
2.6.0
2.4.1
2.4.0
2.3.7
2.1.2
A PETAL-stack batteries-included boilerplate for making Phoenix apps without tedium.
Current section
Files
Jump to
Current section
Files
lib/core/application.ex
defmodule Legendary.Core.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
topologies = Application.get_env(:libcluster, :topologies)
children = [
{Cluster.Supervisor, [topologies, [name: Legendary.Core.ClusterSupervisor]]},
Legendary.Auth.MnesiaClusterSupervisor,
# Start the Ecto repository
Legendary.Core.Repo,
# Start the Telemetry supervisor
Legendary.CoreWeb.Telemetry,
# Start the PubSub system
{Phoenix.PubSub, name: Legendary.Core.PubSub},
FunWithFlags.Supervisor,
# Start the Endpoint (http/https)
Legendary.CoreWeb.Endpoint
# Start a worker by calling: Legendary.Core.Worker.start_link(arg)
# {Legendary.Core.Worker, arg}
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Legendary.Core.Supervisor]
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
Legendary.CoreWeb.Endpoint.config_change(changed, removed)
:ok
end
end