application.ex 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. defmodule PodcastFeed.Application do
  2. # See https://hexdocs.pm/elixir/Application.html
  3. # for more information on OTP Applications
  4. @moduledoc false
  5. use Application
  6. def start(_type, _args) do
  7. children = [
  8. # Start the Ecto repository
  9. # PodcastFeed.Repo,
  10. # Start the Telemetry supervisor
  11. PodcastFeedWeb.Telemetry,
  12. # Start the PubSub system
  13. {Phoenix.PubSub, name: PodcastFeed.PubSub},
  14. # Start the Endpoint (http/https)
  15. PodcastFeedWeb.Endpoint
  16. # Start a worker by calling: PodcastFeed.Worker.start_link(arg)
  17. # {PodcastFeed.Worker, arg}
  18. ]
  19. # See https://hexdocs.pm/elixir/Supervisor.html
  20. # for other strategies and supported options
  21. opts = [strategy: :one_for_one, name: PodcastFeed.Supervisor]
  22. Supervisor.start_link(children, opts)
  23. end
  24. # Tell Phoenix to update the endpoint configuration
  25. # whenever the application is updated.
  26. def config_change(changed, _new, removed) do
  27. PodcastFeedWeb.Endpoint.config_change(changed, removed)
  28. :ok
  29. end
  30. end