We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62b6756 commit 608cc84Copy full SHA for 608cc84
lib/web_dev_utils/components.ex
@@ -5,7 +5,7 @@ defmodule WebDevUtils.Components do
5
require EEx
6
7
@doc """
8
- A component for triggering live reloading.
+ A component for triggering live reloading via a websocket
9
"""
10
EEx.function_from_string(
11
:def,
@@ -19,7 +19,7 @@ defmodule WebDevUtils.Components do
19
}
20
function connect() {
21
try {
22
- window.socket = new WebSocket('wss://' + location.host + '/ws');
+ window.socket = new WebSocket(<%= Application.get_env(:web_dev_utils, :reload_url, "'ws://' + location.host + '/ws'") %>);
23
24
window.socket.onmessage = function(e) {
25
if (e.data === "reload") {
0 commit comments