Based on https://github.com/BenjaminBini/socket.io-chat
- NodeJS (server)
- MongoDB (messages, connections and users)
- Redis (connected users)
- Socket.io (instant messaging)
npm install
mongod --replSet rs0 --port 27020 --dbpath ./data/r0s1
mongod --replSet rs0 --port 27021 --dbpath ./data/r0s2
mongod --replSet rs0 --port 27022 --dbpath ./data/r0s3
mongod --port 30000 --dbpath ./data/arb --replSet rs0
mongo --port 27020
Then (in the mongo shell)
rs.initiate()
rs.conf()
rs.add("localhost:27021")
rs.add("localhost:27022")
rs.addArb("localhost:30000")
Open redis-server.exe on your redis folder
nodemon server.js
or (if you don't have nodemon)
node server.js
Open some tabs on localhost:3000 and enjoy the chat !
You can run python file to view stats (yout need to start mongo server first)
python stats.py
This app isn't GPRD compatible !
The IP and the system parameters are logged in mongodb