fix: use venv python for uvicorn and add node version check
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# --- CONFIGURATION (Default values, will be overridden by network_configinventory.env) ---
|
# --- CONFIGURATION (Default values, will be overridden by network_configinventory.env) ---
|
||||||
BACKEND_PORT=8000
|
BACKEND_PORT=8000
|
||||||
@@ -59,10 +59,18 @@ EOF
|
|||||||
|
|
||||||
echo "🔥 Starting Backend on port $BACKEND_PORT..."
|
echo "🔥 Starting Backend on port $BACKEND_PORT..."
|
||||||
echo " CORS origins: $ALLOWED_ORIGINS"
|
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)
|
# 5. Start Frontend (Next.js)
|
||||||
echo "💻 Starting Frontend on port $FRONTEND_PORT..."
|
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
|
cd frontend
|
||||||
echo "📦 Installing frontend dependencies..."
|
echo "📦 Installing frontend dependencies..."
|
||||||
npm install
|
npm install
|
||||||
|
|||||||
Reference in New Issue
Block a user