I have a Next Js app. deployed in azure VM. Running successfully when running it using putty(with the command "npm start"). However, the URL comes down frequently(server stops). Is there a way/script to keep it up and running once started from my putty until when I stop it manually?
Asked
Active
Viewed 41 times
1 Answers
0
To keep NextJs/ReactJs app running even after closing putty window, please try the below:
Make use of Screen by installing it like below command:
sudo apt-get install screen
You can make use of below commands after installing the Screen.
- To reconnect already running session use
screen -r. - To Create a new session use
screen -D -r. - To create a new window inside of a running screen session hit
Ctrl + Aand thenCin immediate succession. - To switch from one screen to another Hit
Ctrl + Aand thenCtrl + Ain immediate succession. - To list open screen windows Hit
Ctrl + Aand thenWin immediate succession.
For more in detail, please refer below links:
Imrankhan-MT
- 226
- 1
- 3
-
Hey, did the suggestion work? do let me know if it solved your problem else share more details so I can troubleshoot. [Help Center -SO](https://stackoverflow.com/help/someone-answers) – Imrankhan-MT May 26 '22 at 08:36