To change the icon of your desktop app;
1- Design an icon and save it as .png (you can design an icon here).
2-Copy and save the icon in your folder.
3- Update the createWindow function with the following code :
function createWindow () { // Create the browser window. win = new BrowserWindow({width:1080, height: 840, minWidth:680, icon:__dirname + '/iconName.png'}) // and load the index.html of the app. win.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }))
- Replace iconName with your icon’s file name.