我正在使用OSX。我在开发服务器中设置了端点。当我访问localhost:8080/_ah/api/explorer
时,收到以下错误消息:
您正在探索的API是通过HTTP托管的,这可能会导致 问题。了解how to use Explorer with a local 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
。
我还尝试使用$ whereis google-chrome
找到Chrome,但这不会返回任何回复。
答案 0 :(得分:2)
试试这个:open /Applications/Google\ Chrome.app --args --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080