Files
Freedom-Loader/main.js
MasterAcnolo fdd0a2fa16 Push
2026-08-15 12:30:23 +02:00

27 lines
646 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 d’habitude
}
app.whenReady().then(() => {
// lancer Express avant d’ouvrir Electron
const expressServer = require("./server/server.js");
createWindow();
});
app.on("window-all-closed", () => {
if (process.platform !== "darwin") app.quit();
});