【发布时间】:2020-01-22 12:32:39
【问题描述】:
我正在尝试通过 AppEngine 上的 express 提供静态应用程序和 API。点击 app.com/* 应该会将您带到公共目录,但 app.com/v1/ 应该会点击终点。
我的问题是 code in the docs 似乎对我不起作用,即使我完全禁用 express。
我的目录结构如下:
app
--src
---v1
--public
---index.html
--app.yaml
但是将它放在 yaml 中(暂时忽略 API)
handlers:
- url: /static
static_dir: public
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto
访问应用时返回 502。
有什么想法吗?
【问题讨论】:
-
您好,您可以在请求
app.com/时在 Stackdriver Logging 中分享您应用的日志吗?这可能与编码问题有关,以免开始放弃可能性。 -
嗨!堆栈驱动程序没有警告/错误,尝试访问应该在该公共目录中的文件时只有 502 响应。
标签: node.js express google-app-engine