【问题标题】:To host a static (HTML) website on Google App Engine, what should be in the app.yaml file?要在 Google App Engine 上托管静态 (HTML) 网站,app.yaml 文件中应该包含什么内容?
【发布时间】:2013-08-20 05:34:24
【问题描述】:

我可以用它来上传 HTML 页面吗?

app.yaml内容:

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))

【问题讨论】:

标签: python google-app-engine app.yaml


【解决方案1】:

静态网站的最小handlers 部分可能如下所示:

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

- url: /
  static_dir: static

每个站点都不同,因此正如 Sean 在 cmets 中指出的那样,您需要咨询 the documentation

【讨论】:

    猜你喜欢
    • 2010-10-23
    • 2018-03-23
    • 2021-07-23
    • 1970-01-01
    • 2011-04-05
    • 2010-10-19
    • 2023-03-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多