elstat/lib/supervisor.ex

23 lines
383 B
Elixir

defmodule Elstat.Supervisor do
use Supervisor
require Logger
def start_link(opts) do
Supervisor.start_link(__MODULE__, :ok, opts)
end
def init(:ok) do
Logger.info "starting sup"
children = [
%{
id: Elstat.Cowboy,
start: {Elstat.Cowboy, :start_link, []},
}
]
Supervisor.init(children, strategy: :one_for_one)
end
end