javascript - commander.js not parsing input -
I set the commander to create a server start script with a -e
flag .Jesus is using NODE_ENV
but when I do .bin / start -e development
, it returns the fact instead of the input code
var program = (requires 'commander'); Var sh = Expected ('Sh'); Program Version ('1.0.0'). Option ('-, - Anti-Virus', 'Set NODE_ENV varible'). PRSE (process.argv); Console.log ('Running: NODE_ENV' + program.enviroment + 'node index.js'); Sh ('NODE_ENV' + program.enviroment + 'node index.js');
Add some class brackets to:
< / Code>
They are used to determine the amount of arguments.
div>
Comments
Post a Comment