37 lines
812 B
Batchfile
37 lines
812 B
Batchfile
@echo off
|
|
title OpenFin - Backend API
|
|
cd /d "%~dp0backend"
|
|
|
|
echo ============================================
|
|
echo OpenFin Intelligence - Backend FastAPI
|
|
echo ============================================
|
|
echo.
|
|
|
|
:: Check Python
|
|
python --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo ERREUR: Python n'est pas installe ou pas dans le PATH
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
:: Create venv if needed
|
|
if not exist "venv" (
|
|
echo Creation de l'environnement virtuel...
|
|
python -m venv venv
|
|
)
|
|
|
|
:: Activate venv
|
|
call venv\Scripts\activate.bat
|
|
|
|
:: Install deps if needed
|
|
echo Installation des dependances...
|
|
pip install -r requirements.txt -q
|
|
|
|
echo.
|
|
echo Backend demarre sur http://localhost:8000
|
|
echo Documentation API: http://localhost:8000/docs
|
|
echo.
|
|
python -m uvicorn main:app --host 0.0.0.0 --port 8000 --reload
|
|
pause
|