Run your Facebook Messenger bot on Micro
$ npm install --save micro-messenger
module.exports = require('micro-messenger')()
.use(
// add `messenger-core` plugins
// and/or your own:
async (message, context) => {
if (context.topic === 'postback.GET_STARTED') {
// do things you want to do upon a GET_STARTED postback
}
}
)
.else(async (req, res) => {
// do other amazing webhook things
})
MIT © Andreas Pizsa