Current section

Files

Jump to
messenger_bot_store lib messenger_bot_store application.ex
Raw

lib/messenger_bot_store/application.ex

defmodule MessengerBotStore.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
alias MessengerBotStore.Supervisor.EventMapper
def start(_type, _args) do
import Supervisor.Spec, warn: false
# List all child processes to be supervised
children = [
supervisor(EventMapper, [], id: make_ref(), restart: :permanent),
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: MessengerBotStore.Supervisor]
Supervisor.start_link(children, opts)
end
end