Fix socket connectivity on production.
Remove debug code.
This commit is contained in:
parent
510cdcbc9c
commit
eb9fd09a2b
4 changed files with 4 additions and 4 deletions
|
@ -27,7 +27,7 @@ config :shoehorn,
|
||||||
config :logger, backends: [RingLogger]
|
config :logger, backends: [RingLogger]
|
||||||
|
|
||||||
config :ui, UiWeb.Endpoint,
|
config :ui, UiWeb.Endpoint,
|
||||||
url: [host: "localhost"],
|
url: [host: "www.geokunis2.nl"],
|
||||||
http: [port: 80],
|
http: [port: 80],
|
||||||
secret_key_base: "HEY05EB1dFVSu6KykKHuS4rQPQzSHv4F7mGVB/gnDLrIu75wE/ytBXy2TaL3A6RA",
|
secret_key_base: "HEY05EB1dFVSu6KykKHuS4rQPQzSHv4F7mGVB/gnDLrIu75wE/ytBXy2TaL3A6RA",
|
||||||
root: Path.dirname(__DIR__),
|
root: Path.dirname(__DIR__),
|
||||||
|
|
|
@ -37,7 +37,7 @@ defmodule MorseServer do
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def handle_cast({:progress, new_progress}, {pid, progress}) do
|
def handle_cast({:progress, new_progress}, {pid, _progress}) do
|
||||||
broadcast_progress(new_progress)
|
broadcast_progress(new_progress)
|
||||||
{:noreply, {pid, new_progress}}
|
{:noreply, {pid, new_progress}}
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,8 +12,8 @@ channel.join()
|
||||||
let progressBar = document.getElementById("morse-progress")
|
let progressBar = document.getElementById("morse-progress")
|
||||||
|
|
||||||
channel.on("update", (content) => {
|
channel.on("update", (content) => {
|
||||||
console.log(content["value"])
|
|
||||||
progressBar.value = content["value"]
|
progressBar.value = content["value"]
|
||||||
|
progressBar.innerHTML = content["value"]
|
||||||
});
|
});
|
||||||
|
|
||||||
export default socket
|
export default socket
|
||||||
|
|
|
@ -2,6 +2,6 @@ defmodule UiWeb.MorseProgressChannel do
|
||||||
use UiWeb, :channel
|
use UiWeb, :channel
|
||||||
|
|
||||||
def join(channel_name, _params, socket) do
|
def join(channel_name, _params, socket) do
|
||||||
{:ok, %{hi: :there}, socket}
|
{:ok, channel: channel_name, socket}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue