Options
All
  • Public
  • Public/Protected
  • All
Menu

Convergence JavaScript Client

Introduction

This is the API documentation for the Convergence JavaScript client. The main entrypoint is the Convergence class which has several methods for connecting to the Convergence server. From there the ConvergenceDomain class will provide access to interact with the Convergence Domain and the various services it provides.

Getting Started

The example below shows the basics for connecting to the Convergence Service.

import Convergence from "@convergence/convergence";

const url = "https://realtime.convergence.io/domain/test/example";
Convergence
  .connect(url, "username", "password")
  .then(domain => {
    return domain.models.open("someModelId")
  })
  .then(model => {
    console.log(model.root().value());
  })
  .catch(error => console.error(error));