Welcome to the Real-Time Chat Application project! This project is a simple chat application built using Node.js, Express.js, MongoDB, and Socket.io. It allows users to join chat rooms and communicate with each other in real-time.
- Real-time communication using Socket.io
- Multiple chat rooms for parallel discussions
- Persistent storage of chat messages in MongoDB
- User authentication and identification
- Simple and intuitive user interface
Make sure you have the following installed before setting up the project:
- Node.js (https://nodejs.org/)
- MongoDB (https://www.mongodb.com/try/download/community)
-
Clone the repository:
git clone https://github.com/your-username/real-time-chat-app.git
-
Navigate to the project directory:
cd real-time-chat-app
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory of the project:PORT=3000 MONGODB_URI=mongodb://localhost:27017/chat-app
Update the
MONGODB_URI
with your MongoDB connection string. -
Optionally, configure any other settings in the
.env
file as needed.
-
Start the MongoDB server:
mongod
-
Start the Node.js server:
npm start
The application will be accessible at
http://localhost:3000
by default. -
Open the application in your web browser and start chatting!
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.
This project is licensed under the MIT License. Feel free to use and modify the code as needed.