implement basic web server for dashboard,
use templates to do basic SSR on head and header
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { getSyncSettings, requestAPI } from "./utils.js";
|
||||
import { API } from "../vars.js";
|
||||
|
||||
export async function setupClientSync (callback) {
|
||||
const { scheme, rate } = getSyncSettings();
|
||||
@@ -22,7 +21,7 @@ export async function setupClientSync (callback) {
|
||||
}
|
||||
else if (scheme === "interrupt") {
|
||||
callback();
|
||||
const socket = new WebSocket(`wss://${API.replace("https://", "")}/sync/interrupt`);
|
||||
const socket = new WebSocket(`wss://${window.API.replace("https://", "")}/sync/interrupt`);
|
||||
socket.addEventListener("open", (event) => {
|
||||
socket.send(`rate ${rate}`);
|
||||
});
|
||||
|
Reference in New Issue
Block a user