Rockstar5645 Rockstar5645 - 3 months ago 33x
Node.js Question

Deploying a nodejs app to the google cloud platform

I signed up for the free trial of the google cloud platform, and I'm stuck. My application is a node server using express. It needs to connect to a mongodb cluster. I just need to be able to serve a couple of pages. How could I do this using the compute engine. Is there a really simple tutorial to follow to deploy my app? I can't use the app engine because managed vms aren't available in Europe. Thanks.


Deploying a node.js app to Google Compute Engine really isn't all that different from deploying it on any other Infrastructure as a Service provider.

Try one of the following tutorials:

You'll need to spin up a Google Compute Engine VM instance, of course, to deploy to.

You can do this using the gcloud compute instances create command:

gcloud compute instances create --image ubuntu-14-04 --machine-type n1-standard-1 your-instance-name

Then, connect via gcloud compute ssh:

gcloud compute ssh --zone [zone you created your instance in] your-instance-name

You can also do both of these steps from the Cloud Console.