I've got a NodeJS file and I run it with a Windows PowerShell script (run.ps1) that contains this line:
node ./main.js
I would like to pass command line arguments directly when I run the ps script in this way:
./run.ps1 -a firstargument -b secondargument etc...
This method doesn't work. How can I do?
UPDATE: The solution is write node ./main.js $args inside .ps1 script.