Google 应用引擎 + Go + 提供静态文件 + 配置有什么问题

我在 app.yaml 中有这个


application: test

version: 1

runtime: go

api_version: go1


handlers:

- url: /

  static_files: client/index.html

  upload: client/index.html


- url: /index\.html

  static_files: client/index.html

  upload: client/index.html


- url: /(.*\.(css|gif|png|jpg|ico|js|html))

  static_files: client/\1

  upload: client/(.*\.(css|gif|png|jpg|ico|js|html))


- url: /.*

  script: _go_app

我使用“dev_appserver.py test”启动应用程序。当我在浏览器中打开 localhost:8080 或 localhost:8080/index.html 我得到一个 404

http://img.mukewang.com/60e2cba70001d5e804760187.jpg

BIG阳
浏览 143回答 1
1回答

ABOUTYOU

application: testversion: 1runtime: goapi_version: go1handlers:- url: /  static_files: app/client/index.html  upload: app/client/index.html- url: /(.*\.(css|gif|png|jpg|ico|js|html))  static_files: app/client/\1  upload: app/client/(.*\.(css|gif|png|jpg|ico|js|html))- url: /.*  script: _go_app
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Go