How to start pm2 using bat file?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
977 views
I want to create a bat file that will run a sequence of actions:
1. Transfer to a folder level higher
2. Transfer to a folder on the backend
3. Start the server with the command "pm2 start index.js"
4. Run logs "pm2 logs"
Preferably the console is left open
Now stumbled on the third paragraph. Open two consoles, one with the desired folder, and second it makes clear that.
start /min cmd /k cd ..\\backend start "pm2 start index.js"
by | 977 views

1 Answer

0 like 0 dislike
start ..\\backend\\pm2 start index.js ..\\backend\\pm2 logs


cd ..\\backend\\ start pm2 start index.js pm2 logs
by

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
5 answers
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users