如何在app.yaml中声明欢迎文件(例如index.html)

Ham*_*amy 5 python configuration google-app-engine yaml

在Java中,web.xml可能包含一些<welcome-file>元素.我试图在python中做一些相同的事情而没有运气.

application: wk
version: 1
runtime: python
api_version: 1

handlers:
- url: /
  static_dir: docs

welcome_files:
- index.html
Run Code Online (Sandbox Code Playgroud)

有什么想法吗?我收到一条错误,"welcome_files"未被理解.

Rob*_*uin 7

一种可能性:

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
Run Code Online (Sandbox Code Playgroud)