This is a simple websocket practice project. It is a simple chat application that allows users to send messages to each other in real time. and it build just the Server, the client side is not included. And also this project is inspired by this video (https://youtu.be/BcuXtC4afzU?si=HPjwiARhpeWNKWOL)
make sure you already have go installed on your machine.
- Clone the repository
- run this command
go run main.go
- go to postman or any other tool that can send websocket request and send a request to, and make sure name is not empty
ws://localhost:9000/ws/chat?name=yourname
- then click connect, after conected then you can send message in field message
type the message in here
- repeat step 3 and 4 to add more user and then see the magic
-
message form user 1 is send to all user that connected to the server, as you can see i was in user2 request screen and then i get message from user1