Update README.md with addr and local flags

This commit is contained in:
bdnugget 2025-01-18 20:41:02 +01:00
parent d6d0f36cee
commit 2a0f9348e9

View File

@ -47,13 +47,22 @@ go run main.go
## Configuration
Server connection settings can be modified in `types/types.go`:
```go
const (
ServerAddr = "boner.be:6969" // Change this to connect to a different server or localhost if you want to run the server locally for development
)
Server connection can be configured using command-line flags:
```bash
# Connect to default server (boner.be:6969)
go run main.go
# Connect to local server
go run main.go -local
# Connect to specific server
go run main.go -addr somehost # Uses somehost:6969
go run main.go -addr somehost:6970 # Uses somehost:6970
```
Note: The `-local` flag is a shorthand for `-addr localhost:6969` and cannot be used together with `-addr`.
## Development
The project uses Protocol Buffers for network communication. If you modify the `.proto` files, regenerate the Go code with: