Please, no lectures about how I should be doing everything asynchronously. Sometimes I want to do things the easy obvious way, so I can move on to other work.
For som
To read the contents of a file synchronously use fs.readFileSync
var fs = require('fs'); var content = fs.readFileSync('myfilename'); console.log(content);
fs.createReadStream creates a ReadStream.