fix: electron backend not starting

This commit is contained in:
LukeGus
2026-05-22 16:16:14 -05:00
parent 3bb305bc38
commit 4c2a317f24
6 changed files with 24 additions and 17 deletions
+8 -5
View File
@@ -2021,12 +2021,15 @@ httpServer.on("error", (err: NodeJS.ErrnoException) => {
throw err;
});
httpServer.listen(HTTP_PORT, async () => {
if (!fs.existsSync(uploadsDir)) {
fs.mkdirSync(uploadsDir, { recursive: true });
}
export const serverReady = new Promise<void>((resolve) => {
httpServer.listen(HTTP_PORT, async () => {
if (!fs.existsSync(uploadsDir)) {
fs.mkdirSync(uploadsDir, { recursive: true });
}
await initializeSecurity();
await initializeSecurity();
resolve();
});
});
const sslConfig = AutoSSLSetup.getSSLConfig();
+2 -1
View File
@@ -137,7 +137,8 @@ import {
},
);
await import("./database/database.js");
const dbServer = await import("./database/database.js");
await (dbServer as unknown as { serverReady: Promise<void> }).serverReady;
await import("./ssh/terminal.js");
await import("./ssh/tunnel.js");
await import("./ssh/file-manager.js");