Initialize project for make chat application use go gorilla websocket
- Go 1.22.2
- PostgreSQL
- Make sure your go installation are configured properly
-
Configure Project
# Run scripts to make env from .env-example make env # Run scripts to install used package make setup
# Run Service
make server
- You must register first via Postman (Postman documentation has been provided).
- When registration is successful, please log in with the email and password that you have registered.
- After successful login, you will successfully get the user ID which has been stored in the cookie. After successful login, you will successfully get the user ID which has been stored in the cookie. Then please visit the web page Link Here. The param (number 1) shows your user ID, and the query param receiver ID shows the user ID you want to send to start a direct message.
- Then you will be able to start a chat with the user you are targeting. and the intended user can also open this web page Link Here.
- First, you have to create a chat room first. Use postman to create a chat room.
- After successfully creating a chat room, you can invite other users who you will enter into the chat room. hit room chat join endpoint on postman to invite users.
- You can see a list of chat rooms that you have. Hit the chat room list endpoint on postman, then you will see a list of chat rooms that you have
- You can also leave a group that you have if you want. Hit leave room chat endpoint on postman. Then, you will be successful in leaving the group.
- If you have created a chat room and have invited several of your friends. You can start a chat on this page Link Here. The param (number 1) shows your user ID, and the query param room chat ID shows the room chat ID that you have created. And then you can start a chat in this chat room and your friends in the group can read the messages you made in the chat room at this link Link Here. NOTE In the url param. Please enter your registered user ID
postman collection has been attached to the documentation folder