This project demonstrates a simple chat application using SignalR to achieve real-time communication. Users can connect to the chat, view the online users, send messages, and see messages from others in real-time.
- Real-time Chat: Users can send messages and view incoming messages in real-time.
- Connection Status: Display the connection status (connected, reconnecting, disconnected) to give feedback to the user.
- Online Users List: Display a list of online users. The list gets updated in real-time when a user connects or disconnects.
- User Identification: Messages are prefixed with the sender's identifier, e.g., "User 1".
- .NET 5 SDK
- Node.js and npm
- A code editor like Visual Studio Code
Navigate to the backend project directory:
cd path/to/your/backendRestore the required packages and run the project:
dotnet restore
dotnet runThis will start the backend server on http://localhost:5111.
Navigate to the frontend project directory:
cd path/to/your/frontendInstall the required npm packages:
npm installThen start the React app:
npm startThis will start the frontend on http://localhost:3000 (or a similar available port).
Open your browser and navigate to the frontend URL to start chatting!
