1.0.0 • Published 5 years ago

sock-chat v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Sock Chat

Sock Chat is a full-stack chat live chat library, ready to be set-up and embedded into your website! The goal is to require as little configuration as possible, reusing your applications sessions and users!

Installation (Server)

Use the package manager npm to install Sock-Chat.

npm i sock-chat

Installation (Client)

Prerequisites

You will need socket.io

Usage

    <section id="socket-chat" 
      data-socketurl="(YOUR SOCKET URL) ex: http://localhost:3000" 
      data-sessionkey="(Users Session Key/Post Key) ex: foobarkey"
    ></section>

    <script src="./dist/js/socket.io.js"></script>
    <script src="./dist/js/sock.chat.client.js"></script>

Usage Windows (Power Shell)

$env:dbtype = "postgres";
$env:dbname = "myapp";
$env:dbuser = "appuser";
$env:dbpass = "appuser_password";
$env:dbhost = "localhost";
$env:dbport = "3113";
$env:socketport = "3000";
//Start the socket server
node core.js

Usage Linux

dbtype = "postgres";
dbname = "myapp";
dbuser = "appuser";
dbpass = "appuser_password";
dbhost = "localhost";
dbport = "3113";
socketport = "3000";
//Start the socket server
node core.js

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

1.0.0

5 years ago