0.0.11 • Published 2 years ago

pikchat-sdk v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

This library was developed by https://www.pikchat.co. Pik Chat, an instant messaging solution (SDK, API and App) for your business website and application to engage your users effectively and efficiently to scale the impact.

Pikchat SDK

Install

This project uses node and npm. Go check them out if you don't have them locally installed.

npm install pikchat-sdk
const pikchat = require('pikchat');
const express = require('express');
const app = express();
const http = require('http');

const server = http.createServer(app);

pikchat.setConfig(pikchat.CONSTANTS.MYSQL_HOST, 'localhost');
pikchat.setConfig(pikchat.CONSTANTS.MYSQL_USERNAME, 'root');
pikchat.setConfig(pikchat.CONSTANTS.MYSQL_PASSWORD, 'root');
pikchat.setConfig(pikchat.CONSTANTS.MYSQL_DATABASE, 'chat');

pikchat.connectMySQL();
pikchat.startPikchatEngine(server);

server.listen(3000, () => {
    console.log('listening on *:3000');
});

Socket events

S.NoEvent nameDescriptionAction
1.SINGLE_CHAT_MESSAGEview
2.SINGLE_CHAT_MESSAGE_DELIVEREDview

single chat message

Event name : SINGLE_CHAT_MESSAGE

Params :

{
    "senderId" : "1234",
    "receiverId" : "1235",
    "message" : "hi siva",
    "messageType" : 1
}

License

MIT

0.0.10

2 years ago

0.0.11

2 years ago

0.0.3

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago