
I have all static files same directory as my app.yaml
Now, I have to specific the static files one by one in my app.yaml
application: xxx
version: 1
runtime: python
api_version: 1
handlers:
- url: /
static_files: index.html
upload: index.html
- url: /style.css
static_files: style.css
upload: style.css
- url: /android.png
static_files: android.png
upload: android.png
- url: /logo.png
static_files: logo.png
upload: logo.png
- url: /helloworld.py
script: helloworld.py
Is there any easier way for me to specific all my static files? (Provide they are same directory level as app.yaml)
I try
- url: /
static_files: index.html
static_dir: \.
upload: index.html
It won’t work.
Fatal error when loading application configuration:
Unexpected attribute "static_dir" for mapping type static_files.
in "C:\Projects\xxx-website\app.yaml", line 12, column 1
As others suggested you can put your files in the static folder and have an app.yaml that looks like this (so you don’t have to enter manually every file):
https://gist.github.com/3031499
You can also specific handlers at the top like: