Skip to content

Instantly share code, notes, and snippets.

@rozap
Created November 7, 2014 17:23
Show Gist options
  • Save rozap/63f42bfb3c91e2543e94 to your computer and use it in GitHub Desktop.
Save rozap/63f42bfb3c91e2543e94 to your computer and use it in GitHub Desktop.
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
worker(Repo, []),
worker(Service.StatsManager, [[]])
]
:application.start(:crypto)
:application.start(:bcrypt)
GenEvent.add_handler(Logger, Logger.Backends.Syslog, [])
opts = [strategy: :one_for_one, name: MyAp.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