Created
November 7, 2014 17:23
-
-
Save rozap/63f42bfb3c91e2543e94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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