This is a basic chat application built using Go. The application leverages WebSockets for real-time communication, the Pat router for HTTP routing, and Jet for template rendering.
- Real-time messaging using WebSockets (Gorilla WebSocket)
- User online status display
- Automatic removal of users when they leave
- Automatic reconnection for users in case of disconnection
Ensure you have the following installed on your machine:
- Go (version 1.16 or later)
- Git
-
Clone the repository:
git clone https://github.com/sanjay-xdr/GoChat.git cd GoChat
-
Install the necessary Go dependencies:
go get github.com/gorilla/websocket go get github.com/bmizerany/pat go get github.com/CloudyKit/jet/v6
To run the chat application, use the following command:
go run cmd/web/*.go