gpt4 book ai didi

google-app-engine - Google App Engine + Go + 提供静态文件 + 配置有什么问题

转载 作者:IT王子 更新时间:2023-10-29 02:24:37 26 4
gpt4 key购买 nike

我在 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

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

关于google-app-engine - Google App Engine + Go + 提供静态文件 + 配置有什么问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19828399/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com