src/bot.js
/*
   * Activates HTTP listener and sets
   * up handler to handle events.
   */
Activates HTTP listener and sets
up handler to handle events.
Activates HTTP listener and sets up handler to handle events .
startHttpServer() {
    app.post('/', (req, res) => {
      this.onEventReceived(req.body, res);
    });
    app.listen(this.port, () => {
      this.robot.logger.info(`Server is running in port - ${this.port}`);
    });
  }
startHttpServer ( ) { app . post ( '/' , ( req , res ) => { this . onEventReceived ( req . body , res ) ; } ) ; app . listen ( this . port , ( ) => { this . robot . logger . info ( ` ${ this . port } ` ) ; } ) ; }
Activates HTTP listener and sets
 up handler to handle events.
Activates HTTP listener and sets up handler to handle events .
// Create an event handler to handle messages. // Listen for new messages.