34 lines
890 B
1
defmodule Blog.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
Blog.Repo,
12
BlogWeb.Telemetry,
13
{Phoenix.PubSub, name: Blog.PubSub},
14
BlogWeb.Presence,
15
{Finch, name: Blog.Finch},
16
# Start the Endpoint (http/https)
17
BlogWeb.Endpoint,
18
BlueskyHose
19
]
20
21
# See https://hexdocs.pm/elixir/Supervisor.html
22
# for other strategies and supported options
23
opts = [strategy: :one_for_one, name: Blog.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
BlogWeb.Endpoint.config_change(changed, removed)
32
:ok
33
end
34
end
35