Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.48 KB

README.md

File metadata and controls

60 lines (45 loc) · 1.48 KB

Real-time service

Facilitates real-time, bidirectional, event-based communication between frontend clients.

Getting started

Prerequisites

  • You have Go installed.

Running the service

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

Air

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

Running Tests

Run all tests:

go test ./...

Run tests with verbose output:

go test -v ./...

Run a specific test:

go test -run TestFilterInvalidRunes

Learn more

  • 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.