1

我正在使用 OSX。我已经在我的开发服务器中设置了我的端点。当我访问时localhost:8080/_ah/api/explorer,我收到此错误消息:

您正在探索的 API 托管在 HTTP 上,这可能会导致问题。了解如何将 Explorer 与本地 HTTP API 一起使用

该链接指示我使用以下特殊标志启动 Chrome 会话

[path-to-Chrome] --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:port

我对在哪里输入此行感到困惑?我假设它应该输入到 CLI 中,所以我在终端上尝试了它:

$ /Applications/GoogleChrome.app --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080

当然,响应是这样的:

$ -bash: GoogleChrome.app: command not found

经过一番研究,我发现我可以使用该$ google-chrome命令启动 Chrome 会话,但这也失败了-bash: google-chrome: command not found

我也尝试使用 定位 Chrome $ whereis google-chrome,但这没有返回任何响应。

4

1 回答 1

2

尝试这个:open /Applications/Google\ Chrome.app --args --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080

于 2016-03-18T18:26:56.173 回答