21 lines
529 B
Elixir
21 lines
529 B
Elixir
defmodule Webring.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 = [
|
|
# Start the PubSub system
|
|
{Phoenix.PubSub, name: Webring.PubSub},
|
|
{Webring.Repo, []}
|
|
# Start a worker by calling: Webring.Worker.start_link(arg)
|
|
# {Webring.Worker, arg}
|
|
]
|
|
|
|
Supervisor.start_link(children, strategy: :one_for_one, name: Webring.Supervisor)
|
|
end
|
|
end
|