Hosting a static application using Google Cloud Storage
Google Storage offers a way of hosting static web applications using buckets. All client-side technologies (HTML, CSS, and JavaScript) can be hosted in a bucket. This option is very inexpensive to host and can scale to a great extent. The costs incurred will be on the assets stored, outbound network traffic and retrieval from storage. We'll use Hugo (https://gohugo.io), a static website generator and host the generated code in a storage bucket. In addition to hosting a static website, the static contents (CSS, JavaScript, and images) of a dynamic website hosted on Google Storage is also a widely accepted use case.
Getting ready
The following are the initial setup verification steps to be carried out before the recipe can be executed:
- Create or select a GCP project
- Enable billing and enable the default APIs (some APIs such as BigQuery, storage, monitoring, and a few others are enabled automatically)
- Install the Google Cloud SDK on your development...