Electron how to read from file

var fs = require('fs');
fs.readFile(app.getPath('desktop')+'/thefile.json', 'utf-8', (err, existingData) => {
  if(err){ }
  console.log("existingData: "+existingData);
})

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top