A Simple Chat Application built using WebSockets and Node.js
https://chat-rooms-e9ev.onrender.com/
NOTE: The project is hosted on Render, on its free plan. So the app will automatically go to sleep when inactive, therefore the next time someone visits it will take some time to load up.
Client: HTML, CSS and JavaScript
Server: Node.js, Express.js, Socket.io and MongoDB
- Real Time Communication between client and server using Socket.io
- Uses MongoDB and Mongoose to store active rooms only.
- Automatic Room expiry if no participants are present.
- Ensures complete privacy and safety by not storing any messages on the server.
- Features an easy-to-navigate UI for a smooth chatting experience.
If you want to run it locally:
Make Sure You have Node, NPM and MongoDB already installed !
Download Node: https://nodejs.org/en
Download MongoDB(Community Server): https://www.mongodb.com/try/download/community
- Clone the Repository:
git clone https://github.com/nexus949/chat-rooms.git
- Navigate to the directory:
cd chat-rooms
- Install all the dependencies:
npm install
- Start the server:
npm start
The server runs on PORT 3000 !
Web Sockets are responsible for establishing a full duplex connection between server and client which allows bidirectional communication flow and sending data over TCP protocol.
This application uses Socket.io Library to establish a web socket connection and provides easy-to-use API for the purpose.
- Socket.io -> https://socket.io/
- ChatGPT -> https://chatgpt.com/