Google App Engine Devserver + dispatch.yaml (gcloud)

0 投票
1 回答
830 浏览
提问于 2025-04-18 16:43

我正在尝试使用新的云SDK预览版来启动我的应用(gcloud preview app run DIRNAME),但是得到了这样的回应:

INFO: Starting API server at: http://localhost:51695
INFO: Starting module "api" running at: http://localhost:8080
INFO: Starting module "default" running at: http://localhost:8081
INFO: Starting admin server at: http://localhost:8000

调度器没有运行,我无法获取调度服务的URL,具体情况可以在 这里找到。

在生产环境中,调度器是完全正常工作的,但我就是无法通过开发服务器启动它。

我该如何让Google Cloud SDK识别dispatch.yaml文件呢?

dispatch.yaml文件的内容是这样的:

application: my-super-secret-app-id
dispatch:
- url: "*/"
  module: default

- url: "*/_*"
  module: api

我的目标是让所有“常规”的请求都由默认模块处理,而以下划线开头的请求则由“api”模块处理。

1 个回答

0

彻底卸载谷歌云SDK,然后重新安装最新版本,问题就解决了。

撰写回答