Skip to content

Instantly share code, notes, and snippets.

@silvolu
Created March 13, 2018 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silvolu/58ee84f50c7abc78d45cddde14805124 to your computer and use it in GitHub Desktop.
Save silvolu/58ee84f50c7abc78d45cddde14805124 to your computer and use it in GitHub Desktop.
Publish Actions on Google V2 apps from different frameworks
// Cloud Functions for Firebase
const functions = require('firebase-functions')
const { dialogflow } = require('actions-on-google')
const app = dialogflow()
exports.factsAboutGoogle = functions.https.onRequest(app)
// AWS Lambda
const { dialogflow } = require('actions-on-google')
const app = dialogflow()
exports.factsAboutGoogle = app
// Self-hosted express
const express = require('express')
const bodyParser = require('body-parser')
const { dialogflow } = require('actions-on-google')
const app = dialogflow()
express().use(bodyParser.json(), app).listen(3000)
@worktermtwo
Copy link

Would it be possible to provide insight on how to host on Microsoft Azure, I have been working on the issue for a while without much success. Any assistance is appreciated and I can be reached at devon.miller@sunlife.com for more information. Thank you in advance for any consideration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment