@cyxth/core
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-beta.1 • Public • Published

@cyxth/core

This is the main entry for your cyxth applications, it handles server connection and authentication and binds all cyxth plugins to work together.

Install @cyxth/core you will also need one or more core plugins i.e Colab, Chat or Calls to get started.

npm install @cyxth/core @cyxth/colab

Example of a cyxth application with calls and chat.

import Cyxth from '@cyxth/core';
import Calls from '@cyxth/calls';
import Chat from '@cyxth/chat';

const APP_URL = "my-app.apps.cyxth.com";
const USER_TOKEN = "token_from_backend";

const cyxth = await new Cyxth(APP_URL,[Calls,Chat]).connect(TOKEN);

const calls: Calls = cyxth.calls();
const chat: Chat = cyxth.chat();

// ... your custom app logic goes here
calls.on("call:new", (data) => {
    callNotify(data)
});

const hangUp = async () => {
    await call.leave();
};

Read More

cyxth guides.

cyxth reference.

REST API.

Package Sidebar

Install

npm i @cyxth/core

Homepage

cyxth.com

Weekly Downloads

5

Version

0.0.1-beta.1

License

BSD-3-Clause

Unpacked Size

10.1 kB

Total Files

4

Last publish

Collaborators

  • cyxthdev