lib/islands/board/cache/top_sup.ex
defmodule Islands.Board.Cache.TopSup do
use Application
alias __MODULE__
alias Islands.Board.Cache.Server
# @impl Application
@spec start(Application.start_type(), term) :: {:ok, pid}
def start(_start_type, :ok = _start_args) do
[
# Child spec relying on `use GenServer`...
{Server, :ok}
]
|> Supervisor.start_link(name: TopSup, strategy: :one_for_one)
end
end