Spaces:
Sleeping
Sleeping
File size: 1,257 Bytes
847d463 412236b 847d463 | 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 | # SupportRAG React Frontend Startup Script
# Starts the Vite dev server on port 8080
Write-Host "============================================" -ForegroundColor Cyan
Write-Host " SupportRAG React Frontend" -ForegroundColor Cyan
Write-Host "============================================" -ForegroundColor Cyan
Write-Host ""
# Check if Node.js is available
if (-not (Get-Command node -ErrorAction SilentlyContinue)) {
Write-Host "[ERROR] Node.js is not installed or not in PATH" -ForegroundColor Red
Write-Host "Install Node.js from https://nodejs.org/" -ForegroundColor Yellow
exit 1
}
Write-Host "[INFO] Node.js version: $(node --version)" -ForegroundColor Green
Write-Host "[INFO] npm version: $(npm --version)" -ForegroundColor Green
# Navigate to frontend directory
$frontendDir = Join-Path $PSScriptRoot "frontend"
Set-Location $frontendDir
# Check if node_modules exists
if (-not (Test-Path "node_modules")) {
Write-Host "[INFO] Installing dependencies..." -ForegroundColor Yellow
npm install
}
Write-Host ""
Write-Host "[INFO] Starting React frontend on http://localhost:8080" -ForegroundColor Green
Write-Host "[INFO] Make sure the API is running on http://127.0.0.1:8000" -ForegroundColor Yellow
Write-Host ""
npm run dev
|