daily-tracker

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

application.ex (1090B)


      1 defmodule DailyTracker.Application do
      2   # See https://hexdocs.pm/elixir/Application.html
      3   # for more information on OTP Applications
      4   @moduledoc false
      5 
      6   use Application
      7 
      8   @impl true
      9   def start(_type, _args) do
     10     children = [
     11       DailyTrackerWeb.Telemetry,
     12       DailyTracker.Repo,
     13       {DNSCluster, query: Application.get_env(:daily_tracker, :dns_cluster_query) || :ignore},
     14       {Phoenix.PubSub, name: DailyTracker.PubSub},
     15       # Start a worker by calling: DailyTracker.Worker.start_link(arg)
     16       # {DailyTracker.Worker, arg},
     17       # Start to serve requests, typically the last entry
     18       DailyTrackerWeb.Endpoint
     19     ]
     20 
     21     # See https://hexdocs.pm/elixir/Supervisor.html
     22     # for other strategies and supported options
     23     opts = [strategy: :one_for_one, name: DailyTracker.Supervisor]
     24     Supervisor.start_link(children, opts)
     25   end
     26 
     27   # Tell Phoenix to update the endpoint configuration
     28   # whenever the application is updated.
     29   @impl true
     30   def config_change(changed, _new, removed) do
     31     DailyTrackerWeb.Endpoint.config_change(changed, removed)
     32     :ok
     33   end
     34 end