-2

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.

  • Yes, the `$` indicates a command prompt. Luckily the go tools and ngrok are both available for Windows. – Adrian Jun 20 '17 at 14:03
  • where is your go code file? I suppose that it's not under GOROOT, please, show output of `pwd` command from terminal. – Oleg Kovalov Jun 20 '17 at 14:09
  • my go file is located on my desktop. Is the issue the location of the file? The installer put Go distribution in c:\Go. – user8188965 Jun 20 '17 at 14:20
  • don't know why this got so many downvotes. people should comment as to why they downvoted. – eduncan911 Jun 20 '17 at 20:01

1 Answers1

0

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.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
eduncan911
  • 17,165
  • 13
  • 68
  • 104
  • thanks! I tried installing Go earlier and I guess I must have made a mistake. – user8188965 Jun 20 '17 at 14:21
  • If you use the Windows package, it should have created the environment variables already. You'd have to close and reopen any CMD prompts to enable the m (or reboot). If you downloaded just the zip, the Installation instructions in the line above would have the required PATH names that need to be added. – eduncan911 Jun 20 '17 at 20:01