0

In the past when I've created a client-side web app using a framework like React, I can create a browser build and push it to a static hosting platform like AWS S3.

For Google Cloud Platform, it seems like the go-to approach is to deploy it to App Engine. If I'm understanding correctly, GAE is a combination of storage and compute resources.

Why can't I simply host the JavaScript app as prepared by webpack?

robsiemb
  • 6,157
  • 7
  • 32
  • 46
serverpunk
  • 10,665
  • 15
  • 61
  • 95
  • 1
    is https://stackoverflow.com/questions/43610300/how-do-i-host-a-react-app-in-google-storage-bucket-behind-cloudflare helpful? – Horatiu Jeflea Oct 10 '19 at 06:09
  • are you trying to deploy it on firebase only – Udit Oct 10 '19 at 06:09
  • What problems are you running into with serving it off of GCS? There are certainly reasons you might want to use App Engine or Firebase Hosting, but GCS can serve static content. – robsiemb Oct 10 '19 at 13:40

1 Answers1

0

Google Cloud Storage (GCS) would be the way to go to host your static website on Google Cloud Platform (GCP). Notice that in order to use GCS you'll need to have a domain as well as a GCP project. The documentation is very straightforward on how to achieve this. Here you can find some examples and other useful information.

You could also host your static website on Google App Engine (GAE). But in this case you'll need to cleverly build your app.yaml file in order to manage your URL handlers, as well as structuring your project in a particular way. Simply uploading the JS app as prepared by webpack won't work. You can find all the useful information here in order to use GAE to host your static website.

Daniel Ocando
  • 3,554
  • 2
  • 11
  • 19