Skip to content

Instantly share code, notes, and snippets.

var fs = require('fs');
var file = __dirname + process.argv[2];
fs.readFile(file, 'utf8', function (err, data) {
if (err) {
console.log('Error: ' + err);
return;
}
var contents = JSON.parse(data);
console.log(contents);