Posted By

BenClayton on 12/22/10


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Node.js: Use command-line arguments

 / Published in: JavaScript

  1. // run with node myFile.js arg1 arg2
  2. process.argv[2]; // will be 'arg1'
  3. process.argv[3]; // will be 'arg2'

Report this snippet  

You need to login to post a comment.