how to return data from fs.readfile code example
Example 1: fs readfile not working
const content = fs.readFileSync('./Index.html', 'utf8');
console.log(content);
Example 2: fs.readfile
fs.readFile('filename', function read(err, data) {
if (err) {
throw err;
}
var content = data;
console.log(content);
});