Files
democratic-money/scripts/http-smoke.sh
root a3f08242fe first commit
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 19:20:03 +00:00

13 lines
452 B
Bash
Executable File

#!/usr/bin/env bash
# Requires: npm run start (or dev) on port 8008
set -euo pipefail
BASE="${1:-http://127.0.0.1:8008}"
echo "[http] GET $BASE/api/public/stats"
code=$(curl -s -o /tmp/stats.json -w "%{http_code}" "$BASE/api/public/stats")
echo "[http] status $code"
cat /tmp/stats.json | head -c 400
echo ""
echo "[http] GET $BASE/api/wallet (expect 401)"
code2=$(curl -s -o /dev/null -w "%{http_code}" "$BASE/api/wallet")
echo "[http] status $code2"