run your Messenger bot on Express
$ npm install --save express-messenger
const messenger = require('express-messenger');
const bodyParser = require('body-parser')
const app = require('express')();
app.post('/',
bodyParser.json(),
messenger()
.use((message, context) => {
switch(context.topic) {
case 'postback.GET_STARTED':
// say hi!
case 'text':
// send a response
}
})
)
messenger-core – Write-once, run-anywhere Messenger bots.
MIT © Andreas Pizsa