14 lines
387 B
Bash
Executable File
14 lines
387 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
base_url="${1:-http://127.0.0.1:3000}"
|
|
repo="${2:-https://github.com/octocat/Hello-World.git}"
|
|
|
|
health="$(curl -fsS "$base_url/health")"
|
|
loc_json="$(curl -fsS "$base_url/loc?repo=$repo")"
|
|
loc_text="$(curl -fsS "$base_url/loc.txt?repo=$repo")"
|
|
|
|
printf 'health: %s\n' "$health"
|
|
printf 'loc json: %s\n' "$loc_json"
|
|
printf 'loc text: %s\n' "$loc_text"
|