1. Vonage Learn
  2. Courses
  3. Onehack
  4. Video Api
  5. Building Video Project Backend

Building the Project Backend

Combining knowledge from other courses, learn build a project with the Vonage Video API


let express = require('express');
let nedb = require('nedb');
let nunjucks = require('nunjucks');
let opentok = require('opentok');

let app = express();
let sessionsDb = new nedb({ filename: 'sessions.db', autoload: true });
nunjucks.configure('views', { autoescape: true, express: app });
let OT = new opentok(process.env.API_KEY, process.env.API_SECRET);

app.get('/:room', function(req, res) {



<!doctype html>
  <div id="app">
  <script src="https://static.opentok.com/v2/js/opentok.min.js"></script>
    let apiKey = '{{apiKey}}';
    let sessionId = '{{sessionId}}';
    let token = '{{token}}';

Need help? Have questions? Join the Vonage Developer Community Slack and use the channel #onehack.