I'm trying to create a simple google home actions. I was able to successfully try out some basic functions in the google firebase function. But when I tried to do the same with Hapi framework, I couldnt make it work? When I tried to search I could only see with frameworks for Express and lambda?
I tried to integrate with hapi, but only got 500 as response. I am also pasting the snippet of it
const { dialogflow } = require('actions-on-google')
const app = dialogflow({
debug: true
})
const welcomeIntent = (conv) => {
conv.contexts.set('previousintent', 1, { 'previousintent': 'welcomeIntent' })
if (!conv.surface.capabilities.has('actions.capability.MEDIA_RESPONSE_AUDIO')) {
conv.close('Sorry, this device does not support audio playback.')
return
}
console.log('welcome intent')
conv.ask('Welcome')
};
app.intent('Default Welcome Intent', welcomeIntent)
fulfillmentRoute.push({
path: `${constants.V1_API_PATH}/vee/fulfillment`,
method: 'POST',
handler: app
})