I got a task to create a powershell or a batch file on Windows which should, in sequence, start a "node file.js", then call a "npm start" command in another directory and then launch a browser to localhost:3000. The problem is that I can not get the exact time when to launch the browser at the very end. I tried to concatenate commands with & and && (How to run two commands in one line in Windows CMD?) but the browser got launched before the scripts reach the end in the first case, never in the second case. I guess cmd simply can't understand when node or npm commands are finished to be executed.
Does anybody have experience with this particular task?