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
Google app engine + Go + serve static files + what is wrong with the config
-
21-07-2022 - |
题
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
解决方案
不隶属于 StackOverflow