Fix socket connectivity on production.

Remove debug code.
This commit is contained in:
Pim Kunis 2019-07-31 14:24:51 +02:00
parent 510cdcbc9c
commit eb9fd09a2b
4 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@ config :shoehorn,
config :logger, backends: [RingLogger]
config :ui, UiWeb.Endpoint,
url: [host: "localhost"],
url: [host: "www.geokunis2.nl"],
http: [port: 80],
secret_key_base: "HEY05EB1dFVSu6KykKHuS4rQPQzSHv4F7mGVB/gnDLrIu75wE/ytBXy2TaL3A6RA",
root: Path.dirname(__DIR__),

View file

@ -37,7 +37,7 @@ defmodule MorseServer do
end
@impl true
def handle_cast({:progress, new_progress}, {pid, progress}) do
def handle_cast({:progress, new_progress}, {pid, _progress}) do
broadcast_progress(new_progress)
{:noreply, {pid, new_progress}}
end

View file

@ -12,8 +12,8 @@ channel.join()
let progressBar = document.getElementById("morse-progress")
channel.on("update", (content) => {
console.log(content["value"])
progressBar.value = content["value"]
progressBar.innerHTML = content["value"]
});
export default socket

View file

@ -2,6 +2,6 @@ defmodule UiWeb.MorseProgressChannel do
use UiWeb, :channel
def join(channel_name, _params, socket) do
{:ok, %{hi: :there}, socket}
{:ok, channel: channel_name, socket}
end
end