From the course: Angular: Creating and Hosting a Full-Stack Site

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Host a Node server on Google Cloud

Host a Node server on Google Cloud

From the course: Angular: Creating and Hosting a Full-Stack Site

Start my 1-month free trial

Host a Node server on Google Cloud

- [Instructor] Okay, so now that we've got some environment, variable stuff set up, the next thing we're going to do is we're going to move our entire Hapi server to Google Cloud, and to make this happen, what we need to do is create a new file in the root of our backends directory, so we're going to say New File, and this file is going to be called app.yaml, and then inside this file, we're just going to add a few configuration options. So we're going to say runtime nodejs, environment flex and beta_settings. We need to say cloud_sql_instances, and then what we need to do is we need to go back to the Cloud console and we need to find this connection name here and copy that, and then we need to paste that here. And once we've done that, the last thing we need to add to this file is some environment variables that will be loaded into our server when it's running on Google Cloud. So this is in contrast to the .env…

Contents