Facilitates real-time, bidirectional, event-based communication between frontend clients.
- You have Go installed.
Clone the repository:
git clone git@github.com:walagames/sketch-with-friends.git
Change to the realtime
directory:
cd realtime
Run the application:
go run *.go
Instead of running go run *.go
every time you make a change, you can use air
to automatically restart the server when files change.
Install air:
go install github.com/air-verse/air@latest
Run the application with hot reloading:
air
Run all tests:
go test ./...
Run tests with verbose output:
go test -v ./...
Run a specific test:
go test -run TestFilterInvalidRunes
- gorilla/websocket - Chat Example: The code in this repository is partially based on this example and can be a good starting point for understanding how to use WebSockets in Go.
- A Tour of Go - Concurrency: Since this application uses goroutines and channels extensively, it's worth taking the time to understand how they work.
- Go by Example: This is a great resource for learning Go. It's not a tutorial, but a collection of examples that illustrate how to use Go features.