node.js - Facebook messenger chatbot application error on heroku -


i wanted build facebook chatbot on messenger.tuitorial link tutorials on deploying chatbot on mac ie osx. os windows 7. tried through 30+ iterations of other tutorials available full precaution , 'exactness'. still application error doesn't seem solved. in heroku logs tried referring reason error. did not either.

index.js

'use strict'  const token = process.env.fb_page_access_token const vtoken = process.env.fb_verify_access_token  const express = require('express') const bodyparser = require('body-parser') const request = require('request') const app = express()  app.set('port', (process.env.port || 5000))  // process application/x-www-form-urlencoded app.use(bodyparser.urlencoded({extended: false}))  // process application/json app.use(bodyparser.json())  // index route app.get('/', function (req, res) {     res.send('hello world, chat bot')  })  // facebook verification app.get('/webhook/', function (req, res) {     if (req.query['hub.verify_token'] === vtoken) {          res.send(req.query['hub.challenge'])     }      res.send('no sir') })  // spin server app.listen(app.get('port'), function() {     console.log('running on port', app.get('port')) }) 

procfile

web : node index.js 

this code seems fine there no syntax error. app has node.js server-side, heroku deploying , git cloud storage. there simpler way of creating these chatbots on messenger without heroku , git[not using templates in chatfuel]? in 1 sdk dev , deploy bot good. dont know php(don't like), please suggest other solutions.

git-hub link : click here


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -