This project is a real-time peer-to-peer (P2P) chat application. This application allows users to exchange messages via WebSocket.
- Node.js: For server-side
- Express: To create the HTTP server
- WebSocket: For real-time communication
- HTML/CSS: For the user interface
-
Install Node.js and NPM. You can download it from the official Node.js website.
-
Clone the project:
git clone https://github.com/SarvarbekUZprog/p2p-chat-mvp.git cd p2p-chat
Please replace
SarvarbekUZprog
with your actual GitHub username. -
Install the required packages:
npm install
-
Start the server:
node index.js
The server will run on port 3000.
-
Open in the browser:
Open your browser and go to
index.html
. This will display your chat application.
- WebSocket provides real-time communication between users.
- Each user is assigned a
userId
(UUID) when connecting. - When a user sends a message to another user, the message is delivered directly to the intended recipient.
- Sarvarbek Aminov