Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Node.js console application skeleton
if (process.argv.length < 3) {
console.log('Usage: node ' + process.argv[1] + ' FILENAME');
process.exit(1);
}
var fs = require('fs')
, filename = process.argv[2];
let input = fs.readFileSync(filename, 'utf8');
// write your program here
// output your solution
console.log(input);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment