Son Of Amroz

node v14.20.1
version: 1.0.0
const express = require('express') const {WebhookClient} = require('dialogflow-fulfillment') const app = express() app.use(express.json()) app.get('/', (req, res) => { res.send("Server Is Working......") })'/webhook', (req, res) => { let agent = new WebhookClient({request: req, response: res}); let intentMap = new Map(); intentMap.set('webhook-demo',handleWebHookIntent); agent.handleRequest(intentMap) }); function handleWebHookIntent(agent){ agent.add("Hello I am Webhook demo How are you...") } app.listen(process.env.PORT)

no comments

    sign in to comment