Skip to content

Instantly share code, notes, and snippets.

@groundedsage
Forked from liammclennan/skeleton.js
Created August 24, 2017 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save groundedsage/a3222f281a14f253e1c65f491c4e27c1 to your computer and use it in GitHub Desktop.
Save groundedsage/a3222f281a14f253e1c65f491c4e27c1 to your computer and use it in GitHub Desktop.
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