Skip to content

Instantly share code, notes, and snippets.

@Ironjanowar
Created June 9, 2019 10:56
Show Gist options
  • Save Ironjanowar/77f9c347e1a85d79c95c1f9a022f7f8d to your computer and use it in GitHub Desktop.
Save Ironjanowar/77f9c347e1a85d79c95c1f9a022f7f8d to your computer and use it in GitHub Desktop.
defmodule NiceBot.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Starts a worker by calling: NiceBot.Worker.start_link(arg)
# {NiceBot.Worker, arg}
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: NiceBot.Supervisor]
Supervisor.start_link(children, opts)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment