本地 GAE 数据存储模拟器上的奇怪 http 端点

Strange http end point on local GAE datastore emulator

我在 google 应用引擎中安装了数据存储模拟器。在我根据 https://cloud.google.com/datastore/docs/tools/datastore-emulator 的教程安装数据存储模拟器后。我发现

[数据存储] API 端点:http://::1:8862 [数据存储] 导出 DATASTORE_EMULATOR_HOST=::1:8862

当我在Safari 上访问端点时,无法访问。我认为 http://::1:8862 是一个奇怪的地址,我不知道为什么会这样,也不知道如何解决这个问题。谢谢

该地址表示 localhost(IPv6 格式)和端口 8862。参见

我没有使用模拟器,所以我不确定这是否适用于 API 端点:也许您可以使用 --host-port 参数指定您想要的模拟器。来自 gcloud beta emulators datastore start:

--host-port=HOST_PORT

The host:port to which the emulator should be bound. Can take the form of a single address (hostname, IPv4, or IPv6) and port:

  ADDRESS[:PORT]

In this format you must enclose IPv6 addresses in square brackets: e.g.

  [2001:db8:0:0:0:ff00:42:8329]:8080

The default value is localhost:8081.