Node.js fs read text file non-block
var fs = require("fs"); fs.readFile('input.txt', function(err, data) { if (err) return consolve.error(err); console.log(data.toString());// w ww . jav a2s . c om }); console.log("Program Ended");