Google Cloud Platform and Its Amazing App Engine
Published: 2020-05-30 16:04:16

Happy Saturday everyone! I hope you are doing well as you're reading this post. I'm doing pretty decent. Just yesterday my team and I presented our thesis app for our coding bootcamp! It's an amazing little social media app for plant enthusiasts. It's very crazy that I will soon be done with the class environment and move into the work force. And what a great economy to start working in! All joked aside I'm excited to show the world what I can do in the world of software development.

With one week left to build our app, we had yet to deploy it! We made a mobile app, and we weren't going to add it to the app store or anything, so all we could do was deploy the back end, but we still needed to do that. Somehow I was entrusted with the amazing task of deploying our lovely app. There was just one problem: I didn't have a lot of experience with deploying! I had deployed on Heroku and Digital Ocean before, but that was about it. I knew I had a big task ahead of me, but it was a challenge I was excited to take on. 

I knew that I wanted to deploy our app on Google Cloud, but I didn't know much about it, so I had to do my research. So I will share with you what I learned about Google Cloud, which will hopefully help us both have a better understanding of it, and then I'll go through how we can deploy a very basic app.

Google Cloud was founded in 2008 by Google, and runs on the same infrastructure that Google uses for their own products (Youtube, Gmail, etc). It was made with a focus on cloud computing services, and they have over 90 products under the Google Cloud Platform brand. Which to me is crazy! Once I learned that I understood why their documentation can be so frustrating to read. 

One of those amazing brands is the Google App Engine, or simply App Engine. App Engine is a platform that allows you to develop and host websites on Google's data centers. And deploying a website with the App Engine actually isn't that bad. So let's walk through deploying a very basic, Hello World, app.

The first thing that we're going to do is go to our GCP console and create a new project. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/kymgpv7xc7iy7lmxjzpr.PNG)

As you can see I currently have three projects, but we're gonna work in My Project 92601.

So after we have a project we can click on the cloud terminal and clone our repo into our project. This would be the same way you always clone your repo! 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/s7s7eg0fc8afh4ng7znf.PNG)

Now we can shell into our repo and test our app. This would be the same command you would normally use to run your app (npm run server, npm run start), but for this app it's 'go run .'.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/iwf227w67awmhoyubz4g.PNG)

If everything is working for your app (mine seems to be working great) you can create your app! You do this with the following gcloud command.

```javascript
gcloud app create
```

Now you're ready to deploy your app! Just run this in the terminal! 

```javascript
gcloud app deploy
```

If you have any errors in your terminal, don't be afraid to look up your errors! But if everything went according to plan, you should get a URL for your sight. Let's check mine out.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/36my0v2n7ko5cwpfnn30.PNG)

Perfect!

Of course this was a very simple app. I haven't gone over environmental variables or app.yaml files, But maybe I will in a future blog post. I hope that this was helpful!