mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Push
This commit is contained in:
26
main.js
Normal file
26
main.js
Normal 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 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();
|
||||
});
|
||||
Reference in New Issue
Block a user