Bruce H
Bruce H

Reputation: 321

How to deploy Google assistant sample code on Heroku

I'm trying to deploy the sample apiai-facts-about-google-nodejs on heroku. I've followed the instructions but when trying to start the app, in the logs, I get the error:

functions deploy factsAboutGoogle --trigger-http
sh: 1: functions: not found

This seems to be because the code was written for Google Cloud Functions. I think the command:

functions deploy xxxxxx --trigger-http

is GCF specific. Do I need to modify this code in some way to make it run on Heroku?

I saw this question/answer which seems to indicate it should just work as-is, but that's not what I'm seeing.

Upvotes: 0

Views: 568

Answers (2)

Quentin Dunand
Quentin Dunand

Reputation: 263

As @leon-nicholls noted:

A previous version of the sample which worked on app engine was compatible with Heroku. The latest version is designed for Cloud functions and you will have modify the code

Here is a working with heroku version of the "Facts about Google" sample exemple: https://github.com/actions-on-google/apiai-facts-about-google-nodejs/tree/d1ac5ac5b3838569f1e55602e0103d8863971572

Upvotes: 1

Leon Nicholls
Leon Nicholls

Reputation: 4646

A previous version of the sample which worked on app engine was compatible with Heroku. The latest version is designed for Cloud functions and you will have modify the code (you could find the previous version in the Git history).

Upvotes: 1

Related Questions