How to declare the welcome file (e.g. index.html) in app.yaml
In Java, the web.xml might contain some <welcome-file>
elements. I am trying to do something equivalent in python with no luck.
application: wk
version: 1
runtime: python
api_version: 1
handlers:
- url: /
static_dir: docs
welcome_files:
- index.html
Any thoughts? I get an error that开发者_Go百科 "welcome_files" is not understood.
One possibility:
application: wk
version: 1
runtime: python
api_version: 1
handlers:
- url: /
static_files: static/index.html
upload: static/index.html
- url: /.*
static_files: static
upload: static
Robert's answer does not work any more. You have to do the following:
- url: /
static_files: static/index.html
upload: static/index.html
- url: /(.*)
static_files: static/\1
upload: static/\1
Route the empty string to index.html.
- url: /$
static_files: static/index.html
upload: static/index.html
- url: /
static_dir: static
精彩评论