fix: use venv python for uvicorn and add node version check

This commit is contained in:
2026-04-18 13:25:05 +00:00
parent cb5c9ecd1b
commit 5e0ffe6d80

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# --- CONFIGURATION (Default values, will be overridden by network_configinventory.env) ---
BACKEND_PORT=8000
@@ -59,10 +59,18 @@ EOF
echo "🔥 Starting Backend on port $BACKEND_PORT..."
echo " CORS origins: $ALLOWED_ORIGINS"
python3 -m uvicorn backend.main:app --host 0.0.0.0 --port $BACKEND_PORT --reload &
.venv/bin/python -m uvicorn backend.main:app --host 0.0.0.0 --port $BACKEND_PORT --reload &
# 5. Start Frontend (Next.js)
echo "💻 Starting Frontend on port $FRONTEND_PORT..."
# Check Node.js version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 20 ]; then
echo "⚠️ WARNING: Node.js v20+ required, but found $(node -v)"
echo " Please upgrade Node.js: https://nodejs.org/"
fi
cd frontend
echo "📦 Installing frontend dependencies..."
npm install