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

0.0.1-beta.0 • 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.

installation

# install core
npm install @cyxth/core


# you will need one or more of this core plugins
npm install @cyxth/chat
npm install @cyxth/calls
npm install @cyxth/colab

# ... more cyxth plugins

an example for a chat application with calls and chat

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

const cyx = new Cyxth("YOUR_APP_URL");

// register required plugins
cyx.register([
    Calls,
    Chat
]);

//connect a user to cyxth
await cyx.connect("USER_TOKEN");

cyx.on('error', (data) => {
    // show error
})

cyx.on('disconnect',data => {
    console.log(`disconnected ${data.reason}`)
})

//... app logic

read more

getting started with cyxth
authorization
client reference

Package Sidebar

Install

npm i @cyxth/core

Weekly Downloads

2

Version

0.0.1-beta.0

License

BSD-3-Clause

Unpacked Size

16.1 kB

Total Files

4

Last publish

Collaborators

  • cyxthdev