0

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?

Saranya
  • 69
  • 1
  • 3

1 Answers1

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 + A and then C in immediate succession.
  • To switch from one screen to another Hit Ctrl + A and then Ctrl + A in immediate succession.
  • To list open screen windows Hit Ctrl + A and then W in immediate succession.

For more in detail, please refer below links:

https://www.digitalocean.com/community/questions/how-keep-my-app-running-after-close-putty-f82aab17-ca84-46a0-8a39-3e25f1dd2d45

Keep play application running after putty terminal closed

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