Create app on electron.js using node, you need to save the file to your desktop, I need to know the way to your desktop. I.e. a person presses a button in the app, and automatically the file is saved to your desktop.
var fio = { data: [] }; fio.data.push({ name: crypt.encrypt(name), group: crypt.encrypt(group) }); var json = JSON.stringify(fio); if(!fs.existsSync('data.json')) { fs.writeFile('data.json', json, 'utf8'); } else { fs.unlink('data.json', function (err) { if(err) return console.log("failed to remove file"); fs.writeFile('data.json', json, 'utf8'); console.log('File written') }) }