Skip to content

Instantly share code, notes, and snippets.

@samccone
Created June 28, 2012 13:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samccone/3011463 to your computer and use it in GitHub Desktop.
Save samccone/3011463 to your computer and use it in GitHub Desktop.
node js argument parser
opts = {
'foo': {
alias: ['f', 'fooo'],
action: zap,
decription: 'this is what foo does'
}
}
require('argParser').init(opts);
@samccone
Copy link
Author

node server.js --foo 3

would pass 3 to function zap()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment