// main.js const { app, BrowserWindow, nativeImage } = require('electron'); const path = require('path'); process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = "true"; function createWindow() { const win = new BrowserWindow({ show: false, // window is hidden width: 1200, height: 800, webPreferences: { nodeIntegration: true, contextIsolation: false } }); win.loadFile(path.join(__dirname, 'index.html')); win.webContents.openDevTools({ mode: 'undocked' }); } app.whenReady().then(createWindow); app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit(); });