express-messenger

0.0.4 • Public • Published

express-messenger NPM version Build Status

Greenkeeper badge

run your Messenger bot on Express

Installation

$ npm install --save express-messenger

Usage

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
      }
    })
)

Related Projects

messenger-core – Write-once, run-anywhere Messenger bots.

Sponsor

Sponsor

License

MIT © Andreas Pizsa

/express-messenger/

    Package Sidebar

    Install

    npm i express-messenger

    Weekly Downloads

    0

    Version

    0.0.4

    License

    MIT

    Last publish

    Collaborators

    • andreaspizsa