How to host static HTML files on Google App Engine?
Solution 1
I wrote a library to do just that, and it works on AppEngine or any other server you want:
https://github.com/stochastic-technologies/static-appengine-hoster
You just throw your files in the directory, and it hosts them. It also supports Jinja2 templates, URL rewriting and multiple domains.
Solution 2
Yes you can host your static files on AppEngine. Just configure your app.yaml-file like the following
- url: /
static_dir: static_files
And put your files in the directory static_files. This way every request is routed to your static files.
Solution 3
I just had the same problem and decided to use this solution... It serves static files from the root directory and uses index.html if you don't give an file. Hope that helps.
# re-direct to index.html if no path is give
- url: /
static_files: index.html
upload: index.html
# access the static resources in the root director
- url: /(.*)
static_files: \1
upload: (.*)
Solution 4
I've found what I believe is a really neat solution.
DryDrop
Basically, from what I'm led to believe, you deploy DryDrop to GAE, configure (domains, Github html repository etc.), then publish your static HTML by pushing to the GitHub repository (GitHub utilises 'hooks' to alert your DryDrop install to any new HTML changes).
I haven't used it personally, yet, but if the former CTO of Threadless Tees, Harper Reed, thinks it's OK, that's good enough for me :-D .
Cheers
Rich
Solution 5
To use your own domain with Google App Engine first you have to set your domain to work with Google Apps.
You then link the relevant Google App Engine application to the Google Apps Domain.
zotherstupidguy
all about ruby and learning new things fast fast fast........
Updated on October 09, 2020Comments
-
zotherstupidguy over 3 years
Is it possible to host a static HTML website on App Engine? And how to make my domain name work with it?
-
Leniel Maccaferri about 10 yearsAWESOME: just what I was looking for, that is, serve a static
.js
file directly from theroot
folder. Thanks. -
Maksim Luzik over 8 yearsThis is the correct approach and should be voted as a correct answer, thanks Brad! :)
-
Greg Haskins over 7 yearsThis method did not work for me, as of January 2017 (only
index.html
gets served). The version from Brad above does work very well for all files in the root directory.