I have tried few of the solutions offered in the internet and none have worked. Below couple of what I tried:
var client = new XMLHttpRequest();
client.open('GET', '/foo.txt');
client.onreadystatechange = function() {
alert(client.responseText);
}
client.send();
var fs = require("fs");
fs.readFile(".esc_jose.txt", function(text){
var textByLine = text.split("\n")
});
using the below code, I get no data from the alert().
var client = new XMLHttpRequest();
client.open('GET', '/esc_jose.txt');
client.onreadystatechange = function() {
alert(client.responseText);
}
client.send();