A chat microservices project utilizing WebSockets
- User Service: Manages user information.
- Chat Service: Facilitates real-time communication using WebSockets and interacts with the User service.
-
Create a User:
curl -X POST http://localhost:5002/users -H "Content-Type: application/json" -d '{"id": 1, "name": "John Doe"}'
-
List Users:
curl -X GET http://localhost:5002/users
-
Get User by ID:
curl -X GET http://localhost:5002/users/1
-
Connect to WebSocket Via Postman:
- Create a new WebSocket request in Postman.
- Enter the WebSocket URL:
ws://localhost:6789
. - Click "Connect".
-
Send a Message:
- In the WebSocket message input field, enter:
{ "user_id": 1, "content": "Hello, everyone!" }
- Click "Send".
- In the WebSocket message input field, enter:
-
Receive Messages:
- Messages will be displayed in the Postman WebSocket response log.