2021-03-24 03:20:29 +11:00
2021-03-24 03:20:29 +11:00
2021-03-18 04:45:43 +11:00
2021-03-18 04:45:43 +11:00
2021-03-18 04:45:43 +11:00
2021-02-28 01:12:33 +11:00
2021-03-24 01:51:55 +11:00
2021-03-17 16:51:37 +11:00
2021-03-24 03:20:29 +11:00

chat-server

An API centric chat server. Uses Sequelize and mariaDB by default.

Setup

There are multiple ways to run this app - it can run on it's own via npm start (for production) or npm run dev (for development). it can also run inside docker using docker-compose up --build - run node configure-script.js to generate docker-compose.yml.

API

This server uses socket.io for communication. Be aware that every chat message requires a valid JWT. See the auth-server for details.

The event types are as follows:

Server:
on 'connection' -> Server waits for "open chat" event to continue
on 'error' -> Server emits and logs an error
on 'open chat' -> Preps the server for your messages, places you in the room 'general'
on 'message' -> Server broadcasts to all other users in your room
on 'disconnect' -> Server will no longer accept your messages
on 'report' -> Report the chatlog with the index 'id'


Chat Commands:
/room name -> Move to the room "name"
/mute username minutes [reason] -> Mutes a specified user for X minutes; only available to admins or mods
/unmute username - Unmutes the previously muted user; only available to admins or mods
S
Description
An API centric chat server.
Readme Zlib 271 KiB
Languages
JavaScript 98.9%
Dockerfile 1.1%