This commit is contained in:
@@ -120,13 +120,20 @@ while true; do
|
||||
# Check if services are still running
|
||||
if ! curl -s http://localhost:8000/health > /dev/null 2>&1; then
|
||||
echo "⚠️ API Gateway seems to be down, restarting..."
|
||||
cd services/api_gateway && python -m uvicorn main:app --host 0.0.0.0 --port 8000 --reload &
|
||||
cd ../..
|
||||
(cd services/api_gateway && python -m uvicorn main:app --host 0.0.0.0 --port 8000 --reload) &
|
||||
fi
|
||||
|
||||
if ! curl -s http://localhost:8001/health > /dev/null 2>&1; then
|
||||
echo "⚠️ User Service seems to be down, restarting..."
|
||||
cd services/user_service && python -m uvicorn main:app --host 0.0.0.0 --port 8001 --reload &
|
||||
cd ../..
|
||||
(cd services/user_service && python -m uvicorn main:app --host 0.0.0.0 --port 8001 --reload) &
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
curl -s -X POST "http://localhost:8000/api/v1/auth/register" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"email": "test@example.com",
|
||||
"password": "password123",
|
||||
"first_name": "Test",
|
||||
"last_name": "User"
|
||||
}'
|
||||
Reference in New Issue
Block a user