A small real time chat build with Node/Express using Redis.
Redis is required (storage of users and messages, IP included).
yarn install to install dependencies.
Run node server with yarn start and follow instructions (server run on http://localhost:3000)
client will emit some events about the state of the connection to the Redis server.
Open socket on client side.
const socket = io();- username is mandatory (any valid string)
socket.emit('chat.join', username);- message is mandatory (any valid string)
socket.emit('chat.message', message);{
"username": "John DOE"
}{
"username": "John DOE",
"message": "Lorem Ipsum"
}{
"username": "John DOE"
}