Is there any tutorial for this? I have 3 files in my project:
- index.html
- index.css
- index.js
Should be simple, but so far I am lost in huge GAE's documentation.
Is there any tutorial for this? I have 3 files in my project:
Should be simple, but so far I am lost in huge GAE's documentation.
I made a simple Go app that does this very nicely. http://yourdomain.com will serve up index.html and the rest of the pages are accessible at http://yourdomain.com/mypage.html
Here's the yaml:
Here's the go program that will serve up all your static files at the root level:
Then throw all your static files in /static directory, run goapp deploy and you're done.
You don't need to call out each file individually in app.yaml as Mark suggests; instead, a simple handler like this will suffice:
Then put your site in a directory called 'static' under the directory containing
app.yaml
.The first handler ensures that
index.html
is served up any time someone asks for a directory. The second handler serves all other URLs directly from the static dir.I don't really think that is what Google intends the service to be used for. But if you really need to serve some static content that is simple.
You define an app.yaml file like so:
Then use
appcfg update .
(assuming your using Linux in the source directory)