https://github.com/bartzalewski/chat-app
This project is a real-time chat server using WebSockets, allowing users to join rooms and exchange messages.
https://github.com/bartzalewski/chat-app
chat go golang html websocket
Last synced: about 1 year ago
JSON representation
This project is a real-time chat server using WebSockets, allowing users to join rooms and exchange messages.
- Host: GitHub
- URL: https://github.com/bartzalewski/chat-app
- Owner: bartzalewski
- Created: 2024-05-27T18:38:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-27T18:38:48.000Z (about 2 years ago)
- Last Synced: 2025-03-25T03:25:54.600Z (about 1 year ago)
- Topics: chat, go, golang, html, websocket
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chat Application
Welcome to the Chat Application! This project is a real-time chat server using WebSockets, allowing users to join rooms and exchange messages.
## Features
- Real-time communication using WebSockets
- Multiple chat rooms
- Broadcast messages to all users in a room
## Getting Started
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
Ensure you have the following installed on your system:
- [Go](https://golang.org/doc/install) (version 1.16+)
- [Git](https://git-scm.com/)
### Installation
1. **Clone the repository**:
```sh
git clone https://github.com/bartzalewski/chat-app.git
cd chat-app
```
2. **Initialize Go modules**:
```sh
go mod tidy
```
3. **Run the application**:
```sh
go run main.go
```
The server will start on `http://localhost:8080`.
## WebSocket Endpoint
- **Join Room**
`ws://localhost:8080/ws/{room}`
- Replace `{room}` with the name of the room you want to join.
## Built With
- [Go](https://golang.org/) - The Go programming language
- [Gorilla Mux](https://github.com/gorilla/mux) - A powerful URL router and dispatcher for Golang
- [Gorilla WebSocket](https://github.com/gorilla/websocket) - A Go implementation of the WebSocket protocol
## Testing the Chat Application
You can use the provided `index.html` file to test the chat application. Open the file in a web browser and use the interface to join rooms and send messages.
## Contributing
Feel free to submit issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- Thanks to the Go community for their invaluable resources and support.
- [Gorilla WebSocket](https://github.com/gorilla/websocket) for making WebSocket implementation straightforward.
---
Happy coding! 🚀