From 7b6042205e7c6135fae4e0d21dbf7a5975e8491b Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 11 Oct 2018 11:02:35 +0200 Subject: Clean up --- shardweb/config/config.exs | 1 + shardweb/lib/shard_web/controllers/page_controller.ex | 2 +- shardweb/lib/shard_web/templates/page/index.html.eex | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'shardweb') diff --git a/shardweb/config/config.exs b/shardweb/config/config.exs index 2b698c1..a905175 100644 --- a/shardweb/config/config.exs +++ b/shardweb/config/config.exs @@ -20,6 +20,7 @@ config :logger, :console, # Configuration for Shard itself (see shard/config/config.exs for explanations) +config :shard, port: elem (Integer.parse ((System.get_env "PORT") || "4044")), 0 config :shard, network_key: :crypto.hash(:sha256, "ShardTestNet") config :shard, identity_suffix: "ID" config :shard, data_path: Path.join [System.user_home, "shard", "data2"] diff --git a/shardweb/lib/shard_web/controllers/page_controller.ex b/shardweb/lib/shard_web/controllers/page_controller.ex index 305e751..620d779 100644 --- a/shardweb/lib/shard_web/controllers/page_controller.ex +++ b/shardweb/lib/shard_web/controllers/page_controller.ex @@ -18,7 +18,7 @@ defmodule ShardWeb.PageController do end end {port_num, _} = Integer.parse port - Shard.Manager.add_peer(ip_tuple, port_num) + Shard.Manager.add_peer({:inet, ip_tuple, port_num}) rescue _ -> nil end diff --git a/shardweb/lib/shard_web/templates/page/index.html.eex b/shardweb/lib/shard_web/templates/page/index.html.eex index efa651b..34441e5 100644 --- a/shardweb/lib/shard_web/templates/page/index.html.eex +++ b/shardweb/lib/shard_web/templates/page/index.html.eex @@ -6,7 +6,7 @@ Address Port - <%= for {{:tcp4, ip, port}, pid, auth} <- conn_list() do %> + <%= for {{:inet, ip, port}, pid, auth} <- conn_list() do %> <%= case auth do %> -- cgit v1.2.3