Run node server with .bat file

I want to start the node server with the file .bat, because every time I start it, I need to run the grunt task. I tried the following lines in start.bat:

grunt build
node index.js

When I execute it, it just runs the command grunt buildand then stops. If I delete the command grunt build, it will execute perfectly node index.js. What am I doing wrong?

+4
source share
2 answers

Try using callso

call grunt build
node index.js
+4
source

&& , , . grunt build && node index.js , , . grunt build &&^ node index.js

+1

Source: https://habr.com/ru/post/1654207/


All Articles