News for hackers. Stuff that matters.
Re:Commander.js – Node.js command-line interfaces made easy by antonapa on Monday June 02, 2014 @05:38PM (#7836619)
At the risk of being ridiculed, how would one go about to just take a variable without flag? Ie specialhttpcliutiltool http://yoururl.com?
Re:Commander.js – Node.js command-line interfaces made easy by nielsbjerg on Tuesday June 03, 2014 @08:23AM (#7839652)
That is done by: process.argv.slice(2)[0] The first two arguments are node, and the name of the file you are running. More here: http://nodejs.org/api/process.html#process_process_argv