mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Fix hard coded websocket address
This commit is contained in:
parent
ee0d559d94
commit
b74218abab
1 changed files with 9 additions and 1 deletions
|
@ -5,8 +5,16 @@ import {
|
||||||
} from "../js/eventHandler.js";
|
} from "../js/eventHandler.js";
|
||||||
import { addDataToWaterfall } from "../js/waterfallHandler.js";
|
import { addDataToWaterfall } from "../js/waterfallHandler.js";
|
||||||
|
|
||||||
|
// ----------------- init pinia stores -------------
|
||||||
|
import { setActivePinia } from "pinia";
|
||||||
|
import pinia from "../store/index";
|
||||||
|
setActivePinia(pinia);
|
||||||
|
|
||||||
|
import { useSettingsStore } from "../store/settingsStore.js";
|
||||||
|
const settings = useSettingsStore(pinia);
|
||||||
|
|
||||||
function connect(endpoint, dispatcher) {
|
function connect(endpoint, dispatcher) {
|
||||||
let socket = new WebSocket("ws://localhost:5000/" + endpoint);
|
let socket = new WebSocket("ws://" + settings.modem_host + ":" + settings.modem_port + "/" + endpoint);
|
||||||
|
|
||||||
// handle opening
|
// handle opening
|
||||||
socket.addEventListener("open", function (event) {
|
socket.addEventListener("open", function (event) {
|
||||||
|
|
Loading…
Reference in a new issue