Simple Node.js read file example

node v4.9.1
version: 2.0.0
endpointsharetweet
var fs = require('fs'); fs.readFile('../build/bundle.js', function(err, data) { if (err) console.log('There was an issue trying to read the file', err); else console.log(data.toString()); }); fs.watch('../app', function (event, filename) { console.log(event); console.log(filename); });
Loading…

no comments

    sign in to comment