4 ms·
At the risk of being ridiculed, how would one go about to just take a variable without flag? Ie specialhttpcliutiltool http://yoururl.com http://yoururl.com?
by antonapa 12y ago
At the risk of being ridiculed, how would one go about to just take a variable without flag? Ie specialhttpcliutiltool http://yoururl.com http://yoururl.com?
- nielsbjerg 12y agoThat 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 http://nodejs.org/api/process.html#process_process_argv