TanguyMrtn / Chat-based-on-Node.js-and-Socket.io-with-Redis-and-MongoDB-interactions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chat-based-on-Node.js-and-Socket.io-with-Redis-and-MongoDB-interactions

Autors

MARITON Tanguy and COMBRIE Loïck

How to run

npm install

node server

Start mongod and redis-server, default port.

If you want to deploy replicaset for mongo, follow tutoriel and be sure to connect mongoose to the right adress.

Same if you don't want to use replicaset (check mongoose adress).

Browse to localhost:3000

If you want to build an Admin panel, you can find some endpoint functions at the end of "server.js".

⚠️ If you want to change room, on the web page, it's at the top left corner so please scroll up ! ⚠️

Features

Know which users are logged in and display them (using Redis) ✅

Store all messages in MongoDB ✅

Use the ReplicaSet to enable better fault tolerance ✅

Be able to display a previous conversation between two users ✅

Output relevant queries: most requested user, the one who communicates the most, etc. ✅

Project progress

08/04/2020 :

Chat ok (server and client sides)

HTML, JS, CSS for client side

Redis for handling connected users

15/04/2020 :

Room system added : one lobby, where people can't write, and 2 chat rooms. People have to select a room.

Messages saved in a mongo database.

When a user connects to a room, he can see all the older messages.

18/04/2020 :

Replicaset tutoriel added

Examples of Mongo requests (basics ones and some with aggregations)

Endpoint API added (at the end of server.js)

Feel free to contact us for further information

About


Languages

Language:JavaScript 80.1%Language:CSS 14.7%Language:HTML 5.2%