Google Compute Engine + Express server goes down after exiting SSH shell

0

I must not be understanding how to use GCE. I thought I could spin up my VM, then spin up my nodejs server like

>$ node index.js &

Now, I've created a firewall rule to allow a certain port and I'm able to hit that endpoint successfully but the moment that I exit out the SSH shell the server stops working. My understanding is that running it in the background meant that it would be up as long as the VM instance was up.

What am I doing wrong?

Thanks in advance.

Kenny

Posted 2019-08-21T16:33:32.777

Reputation: 1

No answers