Home

Vonage Video Learning Server (Node.js)

Vonage Video Learning Server (Node.js)

Vonage Video Learning Server (Node.js)

Video

1.3.0

Vonage Developer Relations

NodeJS

Sample Video Backend Server in Node.js

Sample Vonage Video NodeJS Server App

This simple server app shows you how to use Vonage Video Node Server SDK to create Vonage sessions, generate tokens for those sessions, archive (or record) sessions, and download those archives. You can use this sample server with any of our Sample Web Applications to test our our Video API, or use this as a start for your own sample implementation.

This sample server supports:

  • Video Publishing Rooms - Create various rooms for participants to join.
  • Video Archiving - Record meetings to download and view later.
  • Signaling - Allow the backend to handle sending messages to connected clients
  • Live Broadcasting - You can broadcast meetings via WebRTC, HLS, or to 3rd party RTMP Servers.
  • SIP Connectivity - Allow users to call in, or call users directly, by using the Vonage Voice API SIP Gateway.

This project requires a Vonage Customer Account and access to the Vonage Video API in our Unified Environment.

Steps

  1. To start, ensure you are signed into your Vonage developer account. If you do not have an account yet, you can create one here.

  2. To immediately deploy the application, go to the ‘Deploy Code’ tab. Enter a name for your application in ‘Instance Name’, select your AWS region, and click the ‘Deploy Code’ button.

    1. You will see a pop up prompting you to add your Vonage API Key, Vonage API Secret, and assign your Vonage number to the application - you will be able to buy one here if you do not have one already.
    2. Click ‘Assign a number’ to select your number from the list, then continue to create the application.
    3. You will then see your new application under ‘Deployed Instances’. Click ‘Launch’ to run it.
  3. To view the code and edit the application, go to ‘Get Code’ and click ‘Create a new development environment’.

    1. You will see a pop up prompting you to choose a region, enter a workspace name and assign your Vonage API Key, Vonage API Secret, and number to the application - you will be able to buy one here if you do not have one already.
    2. Click ‘Assign a number’ to select your number from the list, then continue to launch the workspace.
    3. When the workspace opens, you will see a README detailing how to edit, debug, run and deploy the project.
    4. Once your project is deployed, you can use the URL in the terminal output to access your application.

Usage

Once deployed, you have a fully functional server-side server that can be used to communicate with our Vonage Video API. You can then point your test mobile application or one of our various sample web applications at the URL we provide.

  • GET / - The homepage, with some information about various routes
  • GET /session - Returns an Application ID, Session ID, and Client Token to join a video session
  • GET /room/:name - Returns an Application ID, Session ID, and Client token for a custom-named room
  • GET /archive - View Available Archives
  • POST /archive/start - Start a video recording
  • GET /archive/:archiveId - Get Metadata about an archive
  • POST /archive/:archiveId/stop - Stop a specific video recording
  • GET /archive/:archiveId/view - View the specificed archive

For more information about running this server, please check out the GitHub Repository.

Created

14 August 2023

Updated

11 March 2025

Releases

7