Compare commits

...

2 commits

Author SHA1 Message Date
Savely Krendelhoff c393ecd0dc
Update README.md 2025-08-23 18:53:40 +07:00
Savely Krendelhoff 902bb3a854
Update Taskfile 2025-08-23 18:53:32 +07:00
2 changed files with 62 additions and 1 deletions

View file

@ -17,11 +17,34 @@ The Hash of Wisdom server requires clients to solve computational puzzles (proof
# Build server # Build server
go build -o hash-of-wisdom ./cmd/server go build -o hash-of-wisdom ./cmd/server
# Build client # Build client
go build -o client ./cmd/client go build -o client ./cmd/client
``` ```
### Running ### Running
#### Using Task (Recommended)
```bash
# Most useful command - run all checks
task check
# Start server
task server
# Connect client
task client
# Run tests
task test
# See coverage
task test-coverage
# See all available commands
task --list
```
#### Manual Commands
```bash ```bash
# Start server (uses config.yaml by default) # Start server (uses config.yaml by default)
./hash-of-wisdom ./hash-of-wisdom

View file

@ -93,3 +93,41 @@ tasks:
desc: Alias for cpu-burner desc: Alias for cpu-burner
cmds: cmds:
- task: cpu-burner - task: cpu-burner
server:
desc: Build and run the server
cmds:
- go build -o hash-of-wisdom ./cmd/server
- ./hash-of-wisdom
server-config:
desc: Build and run the server with custom config
cmds:
- go build -o hash-of-wisdom ./cmd/server
- ./hash-of-wisdom -config {{.CONFIG | default "config.yaml"}}
client:
desc: Build and run the client
cmds:
- go build -o client ./cmd/client
- ./client -addr {{.ADDR | default "localhost:8080"}}
docker-build:
desc: Build Docker image
cmds:
- docker build -t hash-of-wisdom .
docker-run:
desc: Run Docker container
cmds:
- docker run -p 8080:8080 -p 8081:8081 hash-of-wisdom
metrics:
desc: Check metrics endpoint
cmds:
- curl -s http://localhost:8081/metrics
integration:
desc: Run integration tests only
cmds:
- go test -v ./test/integration/...