Skip to content

Instantly share code, notes, and snippets.

@jgwill
Last active November 7, 2018 22:28
Show Gist options
  • Select an option

  • Save jgwill/e37568ba50bd2adf2eb730572b73ef17 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

Usage. sh

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