Skip to content

Instantly share code, notes, and snippets.

@adkron
Created August 28, 2017 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adkron/c51fc050520ae70c183e99883aff5bbe to your computer and use it in GitHub Desktop.
Save adkron/c51fc050520ae70c183e99883aff5bbe to your computer and use it in GitHub Desktop.
defmodule Zipato.Application do
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Zipato.Configuration,
Zipato.LoginMonitor,
Zipato.Sessions.Supervisor,
]
opts = [strategy: :one_for_one, name: Zipato.Supervisor]
Supervisor.start_link(children, opts)
end
def start_sessions do
Supervisor.start_child(Zipato.Supervisor, Zipato.Sessions.Supervisor.child_spec([]))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment