卡在Google Home教程上了

huangapple go评论79阅读模式
英文:

Stuck on Google Home Tutorial

问题

我正在进行一个关于Actions on Google的入门教程。我已经完成了第4页,但在“Fulfillment Webhook and Deployment”阶段遇到了困难。我将示例后端代码放入了一个名为populationai.go的Go文件中。我对如何在Windows中执行“Using ngrok to locally run the Webhook”部分中列出的命令感到困惑,因为它们是为不同的操作系统设计的。首先,我应该在Windows的命令提示符中执行这些步骤吗?谢谢。

以下是我对这些步骤的困惑:

  1. 我们启动Go应用程序,通过以下命令公开API服务器:

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

     $ ngrok http 9000
    

编辑:每次我尝试执行“go run populationapi.go”命令时,它会显示

'go' 不是内部或外部命令,也不是可运行的程序或批处理文件。

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

英文:

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.

答案1

得分: 0

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

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

确保按照安装说明进行操作。

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

英文:

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.

huangapple
  • 本文由 发表于 2017年6月20日 21:58:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/44655150.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定