A cloud computing platform - Google App Engine also acts as platform-as-a-service to develop and host web applications in Google-managed data centers. Therefore, whether you need to host a static website or build a multi-tiered web application from scratch, you can easily do it using Google’s Infrastructure – Google App Engine.
How? Let me brief you step-by-step.
Create a Google Cloud Platform Project
You need to start a new project on Google Cloud Platform to use Google’s tools for your own app or website. However, it requires you to have a Google account. Now, follow the instructions given below:
1. Go to the Google Cloud Platform Console --> App engine Dashboard and press the button, ‘Create.’
2. If no projects are created yet by your end, you will need to agree to the Terms of Service, select whether you wish to receive email updates or not, and then you would be able to continue with creating projects.
3. Now, enter the name of your project, edit its project ID, and take a note of it.
4. Finally, click on the ‘Create’ button to create your project.
Create an Application
There is always an App Engine application in each cloud platform project. Now, it is your turn to create an app for the project created.
1. You will need a sample application to publish. If you do not have the one to use, download, and unzip the sample app from this resource.
2. Check out the structure of the sample application. Your website content will be available in the website folder, whereas app.yml will be called as your application configuration file.
· The website content should lay within the website folder, and its landing page should have index.html extension, but it can also take whatever form you like.
· The app.yaml configuration file tells the App Engine how the URLs should be mapped to their static files. You would not need to edit it.
Publish your Application
Now that you have got your project made along with getting sample app files, it is the time to publish your app. You have to follow the steps given below:
1. Open Google Cloud Shell.
2. Select the sample-app folder and drag & drop it into code editor’s left pane.
3. Run the below-given code in the command line for selecting your project:
gcloud config set project gaesamplesite
4. Run the given command to go to the directory of your app: cd sample-app
5. Now, you are ready for app deployment and upload your app to App Engine:
gcloud app deploy
6. Next, you would have to enter a number to choose the region to locate your application.
7. Confirm with entering ‘Y.’
8. Now, open your browser and navigate it to your-project-id.Google Cloud Platform to check your website online.
This way, you can easily host your website on Google App Engine. I hope the procedure given above will be helpful.