停留在Google Home教程中 [英] Stuck on Google Home Tutorial

查看:410
本文介绍了停留在Google Home教程中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在撰写Actions on Google教程介绍。我把它写到第4页,我被困在了实现Webhook和部署阶段。我将示例后端代码放入名为populationai.go的Go文件中。我很困惑如何执行Windows中使用ngrok在本地运行Webhook部分列出的命令,因为它们是针对不同的操作系统而设计的。我应该在Windows的命令提示符中首先执行这些步骤吗?感谢。



https://www.programmableweb.com/news/how-to-get-started-google-actions/how-to/2017/01/31

以下是我很困惑的步骤:


  1. 我们启动Go应用程序,它通过go run口令公开API API。

      $ go run populationapi.go 


  2. 我们启动ngrok以在端口9000上公开一个安全的公共隧道通过以下命令:

      $ ngrok http 9000 


编辑:每次我尝试go run populationapi.go命令时,都会说:

'go'不被识别为内部或外部命令,
可操作程序或批处理文件。

编辑:我的go文件是位于我的桌面上。问题是文件的位置?安装程序将Go发行版放在c:\ Go中。

错误意味着您没有安装Go。 >

您需要安装 go ,也称为 Golang 运行他们在步骤4中提供的示例代码。



请确保遵循安装说明。 / p>

这只是一个例子。您也可以用任何语言编写代码。


I am working on an intro to Actions on Google tutorial. I made it to page 4 and I am stuck on the "Fulfillment Webhook and Deployment" stage. I put the sample backend code into a Go file called populationai.go. I'm confused as to how to do the commands listed in the "Using ngrok to locally run the Webhook" section in Windows, as they are designed for a different operating system. Should I be doing these steps in the command prompt of Windows in the first place? Thanks.

https://www.programmableweb.com/news/how-to-get-started-google-actions/how-to/2017/01/31?page=4

Here are the steps I'm confused on:

  1. We start up the Go application, which exposes the API Server via go run populationapi.go

    $ go run populationapi.go
    

  2. We start ngrok to expose a secure public tunnel on port 9000 via the following command:

    $ ngrok http 9000
    

Edit: every time I try the "go run populationapi.go" command it says

'go' is not recognized as an internal or external command, operable program or batch file.

Edit: my go file is located on my desktop. Is the issue the location of the file? The installer put Go distribution in c:\Go.

解决方案

The error means you do not have Go installed.

You need to install go, also known as Golang to run that example code they provide on Step 4.

Make sure to follow the installation instructions as well.

It was just an example. You can write the code in any language as well.

这篇关于停留在Google Home教程中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆