Read a file one line at a time,
as opposed to reading the entire file at once.



Related tasks

 Read a file character by character
 Input loop.


var fs = require("fs");
 
var readFile = function(path) {
    return fs.readFileSync(path).toString();
};
 
console.log(readFile('file.txt'));