I've been using Ubuntu all my life, but today I've been given a different machine installed with Windows 10
. I've an Angular
project and I want to do the following things. All these in a separate terminal:
Navigate into project folder and run
code .
so that I can see the code on Visual studio.Navigate into project folder and run
ng serve
to launch my application and keep it running.Navigate into project folder and run
node server.js
to start backend server and keep it running.this is very painful as the project location is-
C:\Users\tanzeel\Downloads\social-coder
Navigating again and again with a new terminal is what wasting my time. I decided to write a batch
file so that I can do all at once with one single click. This is what my starter.bat
file contains:
cd C:\Users\tanzeel\Downloads\social-coder\application 2>nul && call npm.cmd start
node C:\Users\tanzeel\Downloads\social-coder\server\server.js
code C:\Users\tanzeel\Downloads\social-coder
All of the above 3 commands works perfectly If I manually copy-paste them in separate terminals. But when I try to run them from batch file the problem is only first command is executed.I don't know other two are simply ignored or what. I'm coming from:
I admit that I'm a newbie and there are gaps in my knowledge. Please correct me.