This commit is contained in:
MasterAcnolo
2025-06-28 21:25:57 +02:00
parent bfb3e0cbdf
commit accb55e538
3 changed files with 44 additions and 4505 deletions

26
main.js Normal file
View File

@@ -0,0 +1,26 @@
const { app, BrowserWindow } = require("electron");
const path = require("path");
function createWindow() {
const win = new BrowserWindow({
width: 1000,
height: 700,
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
},
});
// Charge ton frontend côté serveur Express
win.loadURL("http://localhost:8080"); // Express tournera comme dhabitude
}
app.whenReady().then(() => {
// lancer Express avant douvrir Electron
const expressServer = require("./server/server.js");
createWindow();
});
app.on("window-all-closed", () => {
if (process.platform !== "darwin") app.quit();
});