Simple Chat Application
This project is a simple WebSocket based chat application.
- Golang
- Web Browser (Any of them)
- First, the Go module needs to be installed.
go mod init chatapp
go get github.com/gorilla/websocket
- Then, the project can be run via terminal/cmd.
go build chat_app.go
main
or
go run chat_app.go
- Then we open our index.html file via the web browser. Since the chat can be done with at least two people, it is recommended that you open it in 2 different ways.
- Then we write the message we want to send in the relevant box and click the Send button. A username entry box appears as a pop-up. We enter the name we want in the relevant section and click OK and our message has been sent successfully.
- The other side repeats the same process and we create a conversation.
- When the web page is refreshed, the messages are deleted and the chat starts from the beginning.
- This project allows simple chatting over localhost using WebSocket.
If you have suggestions and recommendations, please contact me.
I would appreciate your support to make the project more modular.