Files
Freedom-Loader/main.js
MasterAcnolo accb55e538 Push
2025-06-28 21:25:57 +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 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();
});