Files
customer-service/lib/customer_service/application.ex
Haim Kortovich 072dbf6e66 WIP
2026-03-05 11:35:01 -05:00

37 lines
1.2 KiB
Elixir

defmodule CustomerService.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
CustomerService.CommandedApp,
CustomerService.Repo,
CustomerService.Projectors.Customer,
CustomerServiceWeb.Telemetry,
{DNSCluster, query: Application.get_env(:customer_service, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: CustomerService.PubSub},
# Start a worker by calling: CustomerService.Worker.start_link(arg)
# {CustomerService.Worker, arg},
# Start to serve requests, typically the last entry
CustomerServiceWeb.Endpoint
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: CustomerService.Supervisor]
Supervisor.start_link(children, opts)
end
# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
@impl true
def config_change(changed, _new, removed) do
CustomerServiceWeb.Endpoint.config_change(changed, removed)
:ok
end
end