Skip to content

Instantly share code, notes, and snippets.

@tzumby
Created January 31, 2019 19:39
Show Gist options
  • Save tzumby/c7226738dbafc8acf3235db616441854 to your computer and use it in GitHub Desktop.
Save tzumby/c7226738dbafc8acf3235db616441854 to your computer and use it in GitHub Desktop.
Crypto Prices application
defmodule CryptoPrices.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: CryptoPrices.Worker.start_link(arg)
# {CryptoPrices.Worker, arg},
CryptoPrices.Aggregator.Supervisor
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: CryptoPrices.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