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();