diff options
Diffstat (limited to 'shard/lib/application.ex')
-rw-r--r-- | shard/lib/application.ex | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/shard/lib/application.ex b/shard/lib/application.ex index 6e2c7d5..0b61cc0 100644 --- a/shard/lib/application.ex +++ b/shard/lib/application.ex @@ -11,20 +11,19 @@ defmodule Shard.Application do def start(_type, _args) do import Supervisor.Spec, warn: false - {listen_port, _} = Integer.parse ((System.get_env "PORT") || "4044") - # Define workers and child supervisors to be supervised children = [ + { DynamicSupervisor, strategy: :one_for_one, name: Shard.DynamicSupervisor }, + + # Applications & data store + Shard.Manager, + + # Keys & identities Shard.Keys, { Task, fn -> Shard.Keys.get_any_identity end }, - - { DynamicSupervisor, strategy: :one_for_one, name: Shard.DynamicSupervisor }, # Networking - { SNet.TCPServer, listen_port }, - - # Applications & data store - { Shard.Manager, listen_port }, + SNet.TCPServer, ] # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html |