I have this in 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

I start the app with "dev_appserver.py test". When I open in the browser localhost:8080 or localhost:8080/index.html I get a 404

Folder structure

有帮助吗?

解决方案

application: test
version: 1
runtime: go
api_version: go1

handlers:
- 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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top