-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify-deployment.sh
More file actions
executable file
Β·51 lines (42 loc) Β· 1.42 KB
/
verify-deployment.sh
File metadata and controls
executable file
Β·51 lines (42 loc) Β· 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Quick deployment verification script
echo "π Testing Deployment..."
echo ""
# Check if backend URL is provided
if [ -z "$1" ]; then
echo "Usage: ./verify-deployment.sh <backend-url>"
echo "Example: ./verify-deployment.sh https://finsentiment-backend.onrender.com"
exit 1
fi
BACKEND_URL=$1
echo "π‘ Testing Backend Health..."
HEALTH_RESPONSE=$(curl -s -w "\n%{http_code}" "${BACKEND_URL}/api/health")
HTTP_CODE=$(echo "$HEALTH_RESPONSE" | tail -n1)
BODY=$(echo "$HEALTH_RESPONSE" | head -n-1)
if [ "$HTTP_CODE" == "200" ]; then
echo "β
Backend is healthy!"
echo " Response: $BODY"
else
echo "β Backend health check failed (HTTP $HTTP_CODE)"
echo " Response: $BODY"
exit 1
fi
echo ""
echo "π Testing Trending Endpoint..."
TRENDING_RESPONSE=$(curl -s -w "\n%{http_code}" "${BACKEND_URL}/api/trending")
HTTP_CODE=$(echo "$TRENDING_RESPONSE" | tail -n1)
if [ "$HTTP_CODE" == "200" ]; then
echo "β
Trending endpoint working!"
COUNT=$(echo "$TRENDING_RESPONSE" | head -n-1 | grep -o '"count":[0-9]*' | grep -o '[0-9]*')
echo " Found $COUNT trending stocks"
else
echo "β Trending endpoint failed (HTTP $HTTP_CODE)"
exit 1
fi
echo ""
echo "π All backend tests passed!"
echo ""
echo "Next steps:"
echo "1. Update Vercel environment variable VITE_API_URL to: $BACKEND_URL"
echo "2. Redeploy frontend on Vercel"
echo "3. Test the full application in your browser"