To host a static (HTML) website on Google App Engine, what should be in the app.yaml file?

99封情书 提交于 2019-12-06 06:26:05

问题


Can I use this for uploading HTML pages?

app.yaml contents:

application: visualvidya
version: 1
runtime: python
api_version: 1

handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css))
  static_files: \1
  upload: (.*\.(gif|png|jpg|ico|js|css))

回答1:


A minimal handlers section for a static site might look something like this:

handlers:
- url: /
  static_files: static/index.html
  upload: static/index.html

- url: /
  static_dir: static

Every site is different, so as Sean pointed out in the comments, you'll want to consult the documentation.



来源:https://stackoverflow.com/questions/18296560/to-host-a-static-html-website-on-google-app-engine-what-should-be-in-the-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!