Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
antonapa
· 12y ago · 0 comments
At the risk of being ridiculed, how would one go about to just take a variable without flag? Ie specialhttpcliutiltool
http://yoururl.com
?
Comments
[–]
nielsbjerg
12y ago
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