elixir-todo-list/lib/todo/system.ex

20 lines
304 B
Elixir

defmodule Todo.System do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, nil)
end
@impl Supervisor
def init(_) do
Supervisor.init(
[
Todo.ProcessRegistry,
Todo.Database,
Todo.Cache
],
strategy: :one_for_one
)
end
end