This is a simple chat application built with Angular, Socket.IO, and MongoDB.
- Real-time messaging between multiple users (This app allows for the same using same instance of the app open in different tabs.)
- Messages are stored in a MongoDB database (local -> chat-app will contain all documents which follow the Message schema.)
- Uses Socket.IO for real-time communication (on, emit events enabled to read/pass messages between server and client.)
- Set up MongoDB
- Install MongoDB on your local machine or use a remote MongoDB service.
- Update the MongoDB connection URL in
server.js
file.
- Set up Socket.IO:
- Ensure Socket.IO server is running and accessible.
- Clone the repository.
- Navigate to the project directory.
- Navigate to
backend
. Install dependencies:npm install
. Thennpm run start
. This fires up the backend server to relay messages on localhost:3000. - In a new terminal, navigate to
frontend
. Install dependencies:npm install
. Thennpm run start
. This opens up the application on localhost:4200. - Open the application in different tabs to view as different users.