Reputation: 205
I need to start node.js app multiple times (200-300 times) with different arguments. Like so:
node index.js ABC
node index.js DEF
...
node index.js XYZ
What is the best approach to achieve that?
Upvotes: 0
Views: 1606
Reputation: 686
put all your arguments line by line in params.txt
:
ABC
DEF
GHI
...
XYZ
cat params.txt | while read -r param; do node index.js $param; done
The script above read the file line by line and pass it to your js script
Upvotes: 2