const{app,BrowserWindow}=require('electron')constpath=require('path')consturl=require('url')letwinfunctioncreateWindow(){// Create the browser window.win=newBrowserWindow({width:800,height:600})win.loadURL// and load the index.html of the app.win.loadURL(url.format({pathname:path.join(__dirname,'./Home.html'),protocol:'file:',//http:slashes:true}))win.on('closed',()=>{win=null})}app.on('ready',createWindow)app.on('window-all-closed',()=>{if(process.platform!=='darwin'){app.quit()}})