#!/usr/bin/env bash
# NABDH — post-start smoke check. Usage: ./verify-deployment.sh https://your-domain.tld
set -uo pipefail
BASE="${1:?Usage: verify-deployment.sh <https://your-domain>}"

check() {
  local path="$1" expect="$2"
  local code
  code=$(curl -s -o /dev/null -w '%{http_code}' "$BASE$path")
  if [ "$code" = "$expect" ]; then
    echo "OK    $path -> $code"
  else
    echo "FAIL  $path -> got $code, expected $expect"
  fi
}

echo "Checking $BASE …"
check "/api/health" 200
check "/login" 200
check "/" 200
