File size: 333 Bytes
8483497 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/env bash
set -euo pipefail
BASE_URL="${BASE_URL:-http://localhost:8080}"
echo "Health check: ${BASE_URL}/"
HTTP_STATUS=$(curl -sL -o /dev/null -w "%{http_code}" "${BASE_URL}/")
if [ "$HTTP_STATUS" -eq 200 ]; then
echo "PASS - got HTTP ${HTTP_STATUS}"
exit 0
else
echo "FAIL - got HTTP ${HTTP_STATUS}"
exit 1
fi
|