1.1.4 • Published 8 months ago

easy-chat-client v1.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

easy-chat-client

Features

easy-chat implements real-time bidirectional event-based communication. It consists of:

  • a Javascript client library (this repository)
  • a Node Js Server for the browser (or a Node.js client)

Its main features are:

Reliability

Connections are established even in the presence of:

  • proxies and load balancers.
  • personal firewall and antivirus software.

For this purpose, it relies on socket io, which first establishes connection to the backend server using the best possible transports.

Minimalistic chat implementation support

You do not need to understand the internal structures and operation of websockets and chat systems. All you need to do is call create a room, heck you not need to destroy a room as this is handled intelligently and automatically;

Simple and convenient API

Sample code:

import { initEasyChat } from "easy-chat-client";

const { easyChatClient, easyChatController } = initEasyChat(
  url, // server url
  userId, // current user uniques, its is importnat that this stays unique throughout your application
  userNames, // user names
  userPhotoUrl // absolute file url for the user photo
);

Installation

// with npm
npm install easy-chat-client

// with yarn
yarn add easy-chat-client

How to use

The following example inits easy-chat-client and gets the chat client and chat controller instances.

import { initEasyChat } from "easy-chat-client";

const { easyChatClient, easyChatController } = initEasyChat(
  url, // web socket server url
  userId, // current user uniques, its is importnat that this stays unique throughout your application
  userNames, // user names probably from the users profile
  userPhotoUrl // absolute file url for the user photo
);

// create a new room
easyChatController.newRoom("id");

// and send message
easyChatController.send("hello world");

Documentation

The source code of the website can be found here. Contributions are welcome!

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site.

License

MIT

1.1.4

8 months ago

1.1.3

8 months ago

1.1.1

11 months ago

1.1.2

11 months ago

1.1.0

11 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago