bigbluebutton-Github/bbb-webhooks
Pedro Beschorner Marin 907d614e2b chore(webhooks): update dependencies
+ lodash@4.17.21
added 208 packages from 892 contributors in 4.512s
fixed 8 of 9 vulnerabilities in 209 scanned packages
  1 package update for 1 vulnerability involved breaking changes

+ redis@3.1.2
+ mocha@8.3.2
added 77 packages from 48 contributors, removed 3 packages and updated 11 packages in 8.948s
fixed 3 of 3 vulnerabilities in 209 scanned packages
  2 package updates for 2 vulnerabilities involved breaking changes

+ body-parser@1.19.0
+ js-yaml@3.14.1
+ nock@10.0.6
+ supertest@3.4.2
+ sinon@7.5.0
added 21 packages from 28 contributors, removed 11 packages, updated 29 packages, moved 3 packages and audited 293 packages in 6.064s
2021-05-06 14:40:00 -03:00
..
config bbb-webhooks: add a timeout configuration to be used on POST requests 2020-06-24 18:03:55 +00:00
extra start refactoring bbb-webhooks to use a proper config library 2019-03-26 17:03:05 -03:00
log promote bbb-webhooks to a well-supported module (removed from labs) 2015-05-06 00:11:02 -03:00
test Start fixing webhooks tests 2019-03-29 20:52:58 +00:00
.dockerignore fix rap events 2018-10-26 14:28:57 -03:00
.gitignore Feature: Convert webhooks application to JS ES6 2017-09-11 11:54:15 -03:00
.nvmrc Update .nvmrc to proper node version 2017-11-01 19:09:46 +00:00
app.js Feature: Convert webhooks application to JS ES6 2017-09-11 11:54:15 -03:00
application.js Start fixing webhooks tests 2019-03-29 20:52:58 +00:00
callback_emitter.js bbb-webhooks: add a timeout configuration to be used on POST requests 2020-06-24 18:03:55 +00:00
Dockerfile update Dockerfile 2019-04-04 11:08:46 -03:00
hook.js Fix redis client and a loop in webhooks 2019-03-28 20:17:20 +00:00
id_mapping.js Fix redis client and a loop in webhooks 2019-03-28 20:17:20 +00:00
logger.js update webhooks dependencies in order to fix vulnerabilities 2018-12-18 23:25:55 -03:00
messageMapping.js fix microphone information on webhooks 2020-02-06 10:15:56 -03:00
package-lock.json chore(webhooks): update dependencies 2021-05-06 14:40:00 -03:00
package.json chore(webhooks): update dependencies 2021-05-06 14:40:00 -03:00
README.md Fixed formatting of README.md 2017-06-12 17:02:12 -04:00
responses.js start refactoring bbb-webhooks to use a proper config library 2019-03-26 17:03:05 -03:00
userMapping.js Fix redis client and a loop in webhooks 2019-03-28 20:17:20 +00:00
utils.js start refactoring bbb-webhooks to use a proper config library 2019-03-26 17:03:05 -03:00
web_hooks.js Start fixing webhooks tests 2019-03-29 20:52:58 +00:00
web_server.js start refactoring bbb-webhooks to use a proper config library 2019-03-26 17:03:05 -03:00

bbb-webhooks

This is a node.js application that listens for all events on BigBlueButton and sends POST requests with details about these events to hooks registered via an API. A hook is any external URL that can receive HTTP POST requests.

You can read the full documentation at: http://docs.bigbluebutton.org/labs/webhooks.html

Development

  1. Install node. You can use NVM if you need multiple versions of node or install it from source. To install from source, first check the exact version you need on package.json and replace the all vX.X.X by the correct version when running the commands below.
wget http://nodejs.org/dist/vX.X.X/node-vX.X.X.tar.gz
tar -xvf node-vX.X.X.tar.gz
cd node-vX.X.X/
./configure
make
sudo make install
  1. Install the dependencies: npm install

  2. Copy and edit the configuration file: cp config_local.coffee.example config_local.coffee

  3. Run the application with:

node app.js
  1. To test it you can use the test application post_catcher.js. It starts a node app that registers a hook on the webhooks app and prints all the events it receives. Open the file at extra/post_catcher.js and edit the salt and domain/IP of your server and then run it with node extra/post_catcher.js. Create meetings and do things on your BigBlueButton server and the events should be shown in the post_catcher.

Another option is to create hooks with the API Mate and catch the callbacks with PostCatcher.

Production

  1. Install node. First check the exact version you need on package.json and replace the all vX.X.X by the correct version in the commands below.
wget http://nodejs.org/dist/vX.X.X/node-vX.X.X.tar.gz
tar -xvf node-vX.X.X.tar.gz
cd node-vX.X.X/
./configure
make
sudo make install
  1. Copy the entire webhooks directory to /usr/local/bigbluebutton/bbb-webhooks and cd into it.

  2. Install the dependencies: npm install

  3. Copy and edit the configuration file to adapt to your server: cp config_local.coffee.example config_local.coffee.

  4. Drop the nginx configuration file in its place: cp config/webhooks.nginx /etc/bigbluebutton/nginx/. If you changed the port of the web server on your configuration file, you will have to edit it in webhooks.nginx as well.

  5. Copy upstart's configuration file and make sure its permissions are ok:

sudo cp config/upstart-bbb-webhooks.conf /etc/init/bbb-webhooks.conf
sudo chown root:root /etc/init/bbb-webhooks.conf
Open the file and edit it. You might need to change things like the user used to run the application.
  1. Copy monit's configuration file and make sure its permissions are ok:
sudo cp config/monit-bbb-webhooks /etc/monit/conf.d/bbb-webhooks
sudo chown root:root /etc/monit/conf.d/bbb-webhooks
Open the file and edit it. You might need to change things like the port used by the application.
  1. Copy logrotate's configuration file and install it:
sudo cp config/bbb-webhooks.logrotate /etc/logrotate.d/bbb-webhooks
sudo chown root:root /etc/logrotate.d/bbb-webhooks
sudo chmod 644 /etc/logrotate.d/bbb-webhooks
sudo logrotate -s /var/lib/logrotate/status /etc/logrotate.d/bbb-webhooks
  1. Start the application:
sudo service bbb-webhooks start
sudo service bbb-webhooks stop