Merge pull request #250 from pandego/fix/docs-align-local-port-17493

docs: align local API port examples with current dev flow
This commit is contained in:
Jamie Pine
2026-03-13 01:53:28 -07:00
committed by GitHub
6 changed files with 30 additions and 23 deletions
+6 -6
View File
@@ -6,7 +6,7 @@ set -e
echo "Generating OpenAPI client..."
# Check if backend is running
if ! curl -s http://localhost:8000/openapi.json > /dev/null 2>&1; then
if ! curl -s http://localhost:17493/openapi.json > /dev/null 2>&1; then
echo "Backend not running. Starting backend..."
cd backend
@@ -26,19 +26,19 @@ if ! curl -s http://localhost:8000/openapi.json > /dev/null 2>&1; then
# Start backend in background
echo "Starting backend server..."
uvicorn main:app --port 8000 &
uvicorn main:app --port 17493 & # Keep the generator on the app's documented local backend port.
BACKEND_PID=$!
# Wait for server to be ready
echo "Waiting for server to start..."
for i in {1..30}; do
if curl -s http://localhost:8000/openapi.json > /dev/null 2>&1; then
for _ in {1..30}; do
if curl -s http://localhost:17493/openapi.json > /dev/null 2>&1; then
break
fi
sleep 1
done
if ! curl -s http://localhost:8000/openapi.json > /dev/null 2>&1; then
if ! curl -s http://localhost:17493/openapi.json > /dev/null 2>&1; then
echo "Error: Backend failed to start"
kill $BACKEND_PID 2>/dev/null || true
exit 1
@@ -52,7 +52,7 @@ fi
# Download OpenAPI schema
echo "Downloading OpenAPI schema..."
curl -s http://localhost:8000/openapi.json > app/openapi.json
curl -s http://localhost:17493/openapi.json > app/openapi.json
# Check if openapi-typescript-codegen is installed
if ! bunx --bun openapi-typescript-codegen --version > /dev/null 2>&1; then