Skip to content

Instantly share code, notes, and snippets.

@jgwill
Last active November 7, 2018 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgwill/e37568ba50bd2adf2eb730572b73ef17 to your computer and use it in GitHub Desktop.
Save jgwill/e37568ba50bd2adf2eb730572b73ef17 to your computer and use it in GitHub Desktop.
NodeJS parse argument using minimist package for Console App
// cliapp.js
"use strict";
const args = require("minimist")(process.argv.slice(2));
//console.log(args);
console.log(args.i);
console.log(args.s);
#Install
npm install minimist --save
#usage
node cliapp.js --i=myIvalue --s=mySValue
@jgutta865
Copy link

Usage. sh

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