Use App Engine and Go to Host a Static Website with Same Domain Redirects
thornelabs.net
thornelabs.net
If you want it 'done for you' or have a site that doesn't fit in the free tier on GAE but don't want to spend money - take a look at Netlify.
Free tier is generous, has CDN, free auto-provisioned SSL, builds automatically from a git repo (GitHUb/GitLab etc) and you can simply upload a _redirects file to handle redirects[0].
It'll even build a 'preview' of a branch, so just create a branch, make your changes and merge request, then Netlify will build a temporary site to view the changes - useful if you need to show someone what the changes to the site will look like.
I just switched from GitLab pages, and even changed domain from the apex to www (to get full DDoS/CDN benefit out of Netlify this is needed) - which is handled automatically.
If you want to have a poke around/speedtest of a site using it I'll link below[1].
Might be nice to add that bit in. Better performance for visitors, and would keep you in the free tier longer if traffic grows.
- url: /static
static_dir: static/
- url: /.*
script: _go_app
The redirect 'map' smells bad- better to simply serve the file if path exists, redirect if it doesn't.https://cloud.google.com/compute/docs/load-balancing/http/us...
Pick one that does automatic SSL with LetsEncrypt. I'm partial to Dreamhost because I've been on them for many years, but there are lots of good ones out there.
http.ServeFile(w, r, "static/"+r.URL.Path)Is that prejudgement borne out in reality?
But, serving static assets from Ruby seems heavy handed. You also end up writing code for things other environments would handle with configuration...like redirects, cache headers, and so forth.
Also, while $7 isn't a lot, it is a little more than other solutions in this hobby level space.
The suggestions for Netlify and Firebase seem better ideas for static content, and both allow for changing configuration instead of coding to satisfy the normal things you do for static assets. Both appear to be free at this hobby level as well.
Just seems a poor option compared to other choices, at least for static content.
(I work on Google Cloud and on Datastore, which is built into App Engine. We bend over backwards to support existing code.)