I somehow can't get nodejs to put the results of a readline into the result variable. I guess it has something to do with readline being async? What would I have to do so I can save everything in a variable?.
var lineReader = require('readline').createInterface({
    input: require('fs').createReadStream('text.txt')
  });
var result = "Hello"; 
lineReader.on('line', function (line) {
  result += line;
});
console.log(result);
//result = "Hello"
