Closed officialprofile closed 1 year ago
For a static website, there is no need to use app engine-you can host the entire website in a bucket.
But how does one open the website then? I need to run npx http-server .
, and simple opening index.html
is not sufficient (result below). Likewise, when opening https://storage.googleapis.com/my-public-bucket/index.html the result is the same.
I went over the guide few times and make most of the configuration described there (except e.g. registering a new domain), but I don't see which of these steps translates into step npx http-server .
which is performed locally.
There is no need to run a server locally. Perhaps this step by step tutorial at https://codelabs.developers.google.com/codelabs/cloud-webapp-hosting-gcs will be easier to follow?
Thank you for the links, however I already know how to set up a static website in the google cloud storage. What I don't know is why there is npx http-server .
in the tutorial if there is no need to run any server. Does this mean that opening index.html should be sufficient if everything is configured correctly? Or am I missing some other ways of running the website?
Sorry for the confusion. The command npx http-server .
is only for testing the static website using a local http server. Once your bucket is configured correctly, you will be able to directly go to your configured URL in your web browser. Does this make sense? Thanks.
Thank you @joshua-gould for your patience and support! Everything works. I thought connecting to domain
can be skipped simply by using the direct google storage url (which works, but only to a degree).
Hello,
I am trying to deploy a static website using google cloud app engine. The examples work well, both locally and on the app engine itself. However, due to the size limitations of the app engine (32 MB I believe), I have to upload my dataset somewhere else. I have tried to deploy whole website to the cloud storage, but I think the storage is not suitable in this case. Nonetheless, I would like to have my datasets to be in the bucket, whereas the rest of the website to be run by the app engine.
I tried to simply do something like this:
but I doesn't work. All I see is a blank, white page with no errors. Of course all the files in the bucket are public.
Is there any quick fix to this problem?