aboutsummaryrefslogtreecommitdiff
path: root/shard/lib/application.ex
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-11 11:02:35 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-11 11:02:35 +0200
commit7b6042205e7c6135fae4e0d21dbf7a5975e8491b (patch)
tree58fc563458702fb456729b79802eacb547a8fc66 /shard/lib/application.ex
parenta2f678dc510e642479d61b81148a433edd7b76fe (diff)
downloadshard-7b6042205e7c6135fae4e0d21dbf7a5975e8491b.tar.gz
shard-7b6042205e7c6135fae4e0d21dbf7a5975e8491b.zip
Clean up
Diffstat (limited to 'shard/lib/application.ex')
-rw-r--r--shard/lib/application.ex15
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