demo_fs.js:
var fs = require('fs'); fs.readFile('demofile.txt', 'utf8', function(err, data) { if (err) throw err; console.log(data); });
C:\Users\My Name>node demo_fs.js
Hello! Welcome to demofile.txt