Adding functional usage of client self updater #10

- Added update command to the server
- Server can request nodes update
- Nodes have an 'endpoint' for updating
- Fixes to the install script
This commit is contained in:
Logan Cusano
2024-03-03 20:49:29 -05:00
parent 976c44838e
commit 956dc89107
6 changed files with 72 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
import { io } from "socket.io-client";
import { logIntoServerWrapper, nodeCheckStatus, nodeJoinServer, nodeLeaveServer, nodeGetUsername, nodeCheckDiscordClientStatus, nodeCheckCurrentSystem } from "./socketClientWrappers.mjs";
import { logIntoServerWrapper, nodeCheckStatus, nodeJoinServer, nodeLeaveServer, nodeGetUsername, nodeCheckDiscordClientStatus, nodeCheckCurrentSystem, nodeUpdate } from "./socketClientWrappers.mjs";
/**
* Initialize the socket connection with the server, this will handle disconnects within itself
@@ -24,6 +24,9 @@ export const initSocketConnection = async (localNodeConfig) => {
});
// Node events/commands
// Requested the node update itself
socket.on('node-update', nodeUpdate);
// Requested to join a discord guild and listen to a system
socket.on('node-join', nodeJoinServer);