Skip to content

zoom/sample-registration-app

Repository files navigation

Zoom Webinar Registration Sample

Use of this sample app is subject to our Terms of Use

This application is an example of how you can use the Zoom API to create your own webinar registration app that stays within the Zoom Rate Limits.

It's built using mostly standard HTML, CSS and JS with familiar packages such as:

  1. Expressjs
  2. Handlebars
  3. Bulma
  4. In-memory MongoDB Server

Prerequisites

  1. A Zoom Account
    1. Pro Plan or higher
    2. Webinar Add-on
  2. The API Key and Secret from a Zoom JWT App

You can follow this guide to create a JWT app with the Zoom Marketplace.

Installation

To get started clone the repo:

git clone https://github.com/zoom/sample-registration-app.git

Once cloned navigate to the sample-registration-app directory:

cd sample-registration-app

Setup

Install the dependencies

npm install

Add Your Credentials

  1. Open the .env file in the project root
  2. Replace the fields with your API Key and API Secret from the Zoom Marketplace
ZM_KEY={{ YOUR API KEY HERE }}
ZM_SECRET={{ YOUR API SECRET HERE }}

Start the Server

As the default database for this project lives in-memory each time you restart the server the database will be cleared. See our section on Configuring MongoDB

Development

To start the server in development mode run the NPM dev script. This will do the following:

  1. Send detailed logs to the server console and error pages
  2. Restart the server on changes to server files - this will clear the in-memory DB
    1. To change this use a standard mongodb instance
    2. or use node instead of nodemon for the dev script in package.json
    3. or start the server using the start NPM script (see next section)
npm run dev

Production

You can use the start script to run the server in production mode. This allows the app to run faster but it does not log by default and does not watch for files changes.

npm run start

Usage

Navigate to http://localhost:3000 to view the home page or go to /r/:webinar_id and the app will guide you through the registration process.

You can change the port the server uses in your .env file:

ZM_KEY=...
ZM_SECRET=...
PORT=8080

Deployment

You can deploy this app on any service that allows you to host dynamic Node.js apps:

  1. Heroku
  2. Google Cloud
  3. AWS

Configuring MongoDB

This app uses an in-memory instance of MongoDB to ensure the project is easy to set up. Out of the box, you don't need to do anything.

If you want to use a real instance of MongoDB, all you need to do is:

  1. Remove the references to mongo-memory-server found in
    1. The beginning of server/index.js
    2. The dependencies in package.json
  2. Provide mongoose.connect() with your connection string in server/index.js.

Contribution

Please send pull requests and issues to this project for any issues or suggestions that you have!

Code Style

This project uses eslint to protect against coding errors along with a pre-commit git hook to ensure files pass linting prior to commit. A code style isn't enforced but the project is compatible with prettier.

You can run npm run lint to see the linter errors directly or your can use npm run lint-fix to have eslint try to fix the issues for you. Most IDEs can also automatically fix linter errors as you save.

Testing

At this time there are no e2e or unit tests. I encourage you to create a pull request adding tests! I hear Cypress is a great project :)

Need help?

If you're looking for help, try Developer Support or our Developer Forum. Priority support is also available with Premier Developer Support plans.