In this video, learn
How do I pass command line arguments to a Node.js program?
or
How to parse command line arguments Node Js
process.argv
In Node.js,
all command-line arguments
received by the shell
are given to the process in an array
called argv ('argument values').
Node.js exposes this array
in the form of 'process.argv'
The first two items in process.argv are:
1,The path to the executable running the JavaScript file
2,The path of the JavaScript file being executed.
So the first command line argument is the third item in the array.
-----------------------------------------------------------------------------------------------------
TypeError: console is not a function
at /home/winner/Documents/nodejs/cmdlArgs/mainapp.js:6:5
if you have any queries pls comment the same.
Thats it ... THANK YOU
#JavaInspires
#NodeJsPractice
#SilentTutorial
Смотрите видео How To Parse Command Line Arguments In Node Js | Java Inspires онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Java Inspires 18 Апрель 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 911 раз и оно понравилось 6 людям.