20 lines
518 B
Elixir
20 lines
518 B
Elixir
|
defmodule HelloWorld.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: HelloWorld.PubSub}
|
||
|
# Start a worker by calling: HelloWorld.Worker.start_link(arg)
|
||
|
# {HelloWorld.Worker, arg}
|
||
|
]
|
||
|
|
||
|
Supervisor.start_link(children, strategy: :one_for_one, name: HelloWorld.Supervisor)
|
||
|
end
|
||
|
end
|