Example:
console.log('process.argv[0]: ' + process.argv[0]);
console.log('process.argv[1]: ' + process.argv[1]);
console.log('process.argv[2]: ' + process.argv[2]);
console.log("process.argv.length: " + process.argv.length);
process.argv.forEach(function(val, index, array) {
console.log(index + ': ' + val);
});
Node.js example: get command line arguments |
No comments:
Post a Comment