Skip to content

BadLuckZ/Study-Socket-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Socket.IO Chat Application Demo

A real-time chat application built with Socket.IO demonstrating WebSocket communication.

Features

  • Real-time messaging using WebSocket protocol
  • Live typing indicators
  • Dark/Light theme toggle
  • Real-time connection status
  • Message timestamps with formatting

Note

Network Requirements: All devices must be connected to the same local network.

  • Multiple frontend instances can run on a single device
  • Multiple devices can connect as clients
  • Only one backend server is required to handle all connections

Getting Started

  1. Clone the repository:
git clone https://github.com/BadLuckZ/Study-Socket-Programming.git
cd study-socket-programming
  1. Configure the server:

    • Navigate to /backend/utils/config.ts
    • Configure the following settings:
      • MY_IP: Your device's local IP address
      • SERVER_IP: Server's IP address (same as MY_IP if running server)
      • PORT: Server port number (default: 3000)
  2. Start the backend server:

cd backend
npm install
npm run dev

Note: Ensure only one backend server instance is running on the network

  1. Launch the frontend application:
cd frontend
npm install
npm run dev

You can run multiple frontend instances either:

  • On the same device using different browser windows
  • On different devices within the same network
  1. Access the application:
    • Open your web browser
    • Navigate to the local URL displayed in your terminal

About

Study Socket Programming for Computer Network I

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published