Skip to content

Commit c3bfe4d

Browse files
feat: lanzador EJECUTAR_APP.bat para correr la app en un clic (uvicorn + Swagger) + nota en README
1 parent 67f3564 commit c3bfe4d

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

‎EJECUTAR_APP.bat‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@echo off
2+
chcp 65001 >nul
3+
cd /d "%~dp0"
4+
title SecureTask API
5+
echo ============================================================
6+
echo SecureTask API - Ejecutar la aplicacion (demo)
7+
echo ============================================================
8+
echo.
9+
set PYCMD=python
10+
where python >nul 2>&1 || set PYCMD=py -3
11+
if not exist ".venv\Scripts\python.exe" (
12+
echo [1/2] Creando entorno virtual e instalando dependencias ^(solo la 1a vez^)...
13+
%PYCMD% -m venv .venv
14+
".venv\Scripts\python.exe" -m pip install --upgrade pip -q
15+
".venv\Scripts\python.exe" -m pip install -r requirements.txt -q
16+
) else (
17+
echo [1/2] Entorno ya preparado.
18+
)
19+
echo [2/2] Iniciando el servidor en http://localhost:8000 ...
20+
start "SecureTask API - servidor (no cerrar durante la demo)" ".venv\Scripts\python.exe" -m uvicorn app.main:app --host 127.0.0.1 --port 8000
21+
timeout /t 6 >nul
22+
start "" http://localhost:8000/docs
23+
echo.
24+
echo La app esta corriendo. Se abrio la documentacion interactiva (Swagger):
25+
echo http://localhost:8000/docs (probar los endpoints)
26+
echo http://localhost:8000/health
27+
echo.
28+
echo Para DETENER la app, cierra la ventana titulada "SecureTask API - servidor".
29+
pause

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ pods no-root, sondas `/health`), `Service`, `Ingress`, `HPA` (2→6 réplicas) y
6868

6969
## 4. Cómo ejecutarlo (local)
7070

71+
**Windows — un clic:** doble clic en **`EJECUTAR_APP.bat`** → crea el entorno, instala dependencias,
72+
arranca el servidor y abre la documentación interactiva (Swagger) en `http://localhost:8000/docs`.
73+
74+
**Manual:**
7175
```bash
7276
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
7377
pip install -r requirements-dev.txt

0 commit comments

Comments
 (0)