On a VM instance of Compute Engine, I created a little web server with express js.
I connected the server to my own domain, xxxx.kr. It works well when I run 'sudo node app.js' . But I quit the cloud shell window, showing "listening 80 port.....". It doesn't work.
I tried to use pm2 , and some kind of tools for automatic server , but all things dont work.
My question is:
1. Is it possible to keep running my server after close GCP's cloud shell?
2. In real Industry using Google Cloud, How keep server working without turn on the sessions?
sorry for my poor English..
You can SSH into your Compute Engine instance and run your Node.js application as a background process to keep it running even after you disconnect.
To achieve this, you can use utilities like pm2 or nohup:
These methods are commonly used to keep applications running in production environments. Let me know if you need further guidance on setting them up!
Thanks
Vinoth_GCP