66 lines
1.8 KiB
Batchfile
66 lines
1.8 KiB
Batchfile
@echo off
|
|
title TechScout Launcher
|
|
echo ============================================================
|
|
echo TECHSCOUT - Technology Scouting Dashboard
|
|
echo ============================================================
|
|
echo.
|
|
|
|
:: Check if Ollama is running
|
|
echo [1/3] Checking Ollama status...
|
|
curl -s http://localhost:11434/api/tags >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo Ollama is not running. Starting it now...
|
|
start "Ollama Server" cmd /c "ollama serve"
|
|
echo Waiting for Ollama to start...
|
|
timeout /t 5 /nobreak >nul
|
|
|
|
:: Check again
|
|
curl -s http://localhost:11434/api/tags >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo ERROR: Could not start Ollama automatically.
|
|
echo Please install Ollama from https://ollama.ai
|
|
echo Then run this launcher again.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
)
|
|
echo Ollama is running!
|
|
|
|
:: Start API server
|
|
echo.
|
|
echo [2/3] Starting API server...
|
|
start "TechScout API Server" cmd /k "cd /d %~dp0 && python api_server.py"
|
|
|
|
:: Wait for API server to start
|
|
timeout /t 3 /nobreak >nul
|
|
|
|
:: Verify API server
|
|
curl -s http://localhost:8000/api/health >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo WARNING: API server may still be starting...
|
|
timeout /t 3 /nobreak >nul
|
|
)
|
|
echo API server started!
|
|
|
|
:: Start dashboard
|
|
echo.
|
|
echo [3/3] Starting dashboard...
|
|
echo.
|
|
echo ============================================================
|
|
echo TechScout is ready!
|
|
echo.
|
|
echo Dashboard: http://localhost:3001
|
|
echo API Server: http://localhost:8000
|
|
echo.
|
|
echo Your browser will open automatically.
|
|
echo.
|
|
echo TO STOP: Close all TechScout windows, or press Ctrl+C here
|
|
echo ============================================================
|
|
echo.
|
|
|
|
cd "%~dp0dashboard"
|
|
start "" http://localhost:3001
|
|
npm run dev -- -p 3001
|