Compare commits
2 commits
c393ecd0dc
...
baa7527fb5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
baa7527fb5 | ||
|
|
89b5fb9cf1 |
23
README.md
23
README.md
|
|
@ -22,6 +22,29 @@ go build -o client ./cmd/client
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
|
|
||||||
|
#### Using Task (Recommended)
|
||||||
|
```bash
|
||||||
|
# Most useful command - run all checks
|
||||||
|
task check
|
||||||
|
|
||||||
|
# Start server
|
||||||
|
task server -- -config config.yaml
|
||||||
|
|
||||||
|
# Connect client
|
||||||
|
task client -- --addr=localhost:8080
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
|
||||||
38
Taskfile.yml
38
Taskfile.yml
|
|
@ -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 {{.CLI_ARGS}}
|
||||||
|
|
||||||
|
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 {{.CLI_ARGS | default "-addr 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/...
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue