How do you host your website on Google App Engine?
Google App Engine is a powerful platform that lets you build and run applications on Google's infrastructure — whether you need to build a multi-tiered web application from scratch or host a static website. Here's a step-by-step guide to hosting your website on Google App Engine.
Creating a Google Cloud Platform project
To use Google's tools for your own site or app, you need to create a new project on Google Cloud Platform. This requires having a Google account.
Creating an application
Each Cloud Platform project can contain one App Engine application. Let's prepare an app for our project.
website
folder contains your website content and
app.yaml
is your application configuration file.
website
folder, and its landing page must be called
index.html
, but apart from that it can take whatever form you like.
app.yaml
file is a configuration file that tells App Engine how to map URLs to your static files. You don't need to edit it.
Publishing your application
Now that we've got our project made and sample app files collected together, let's publish our app.
sample-app
folder into the left pane of the code editor.
bash
gcloud config set project gaesamplesite
Then run the following command to go to your app's directory:
bash
cd sample-app
You are now ready to deploy your application, i.e. upload your app to App Engine:
bash
gcloud app deploy