const { app, BrowserWindow } = require('electron'); app.on('ready', () => { let win = new BrowserWindow({ webPreferences: { nodeIntegration: true }, autoHideMenuBar: true, }); // and load the index.html of the app. win.loadFile('index.html'); }); app.on('window-all-closed', () => { // On macOS it is common for applications and their menu bar // to stay active until the user quits explicitly with Cmd + Q if (process.platform !== 'darwin') app.quit(); });