Edit: I got it to work, but I forgot to mention that I'd like the console to remain open so I can see what's going on in real time. Is there a way to keep the console open somehow? thx!
so my nodejs app crashes sometimes, and in order to reset it I use 'forever start index.js'
Problem is, I'm currently starting it from a .bat file and Idk how to start my app forever with the batch file
My .bat file looks like this:
"forever start index.js"
Thx for the help
"forever start index.js"
expecting my app to reset whenever it crashed
To answer your edit:
Edit: I got it to work, but I forgot to mention that I'd like the console to remain open so I can see what's going on in real time. Is there a way to keep the console open somehow? thx!
Run the bat
file from the command line, not by double-clicking on it.
You can do this by:
bat
file is in with cd C:/myDir/etc/
bat
file is present in the directory you have your command prompt looking at by entering dir
and reading the outputstart ./myfile.bat
and the CMD window will stay open.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.