-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.bat
More file actions
45 lines (38 loc) · 1.31 KB
/
start.bat
File metadata and controls
45 lines (38 loc) · 1.31 KB
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
37
38
39
40
41
42
43
44
45
@echo off
echo ==========================================
echo EventAI Chatbot - Iniciando
echo ==========================================
echo.
:: Verificar si Node.js está instalado
node --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Node.js no está instalado o no está en el PATH
echo Por favor instala Node.js desde https://nodejs.org/
pause
exit /b 1
)
echo [INFO] Node.js detectado correctamente
echo.
:: Detener procesos previos de Node.js
echo [INFO] Deteniendo procesos previos de Node.js...
taskkill /f /im node.exe >nul 2>&1
timeout /t 2 >nul
:: Iniciar el servidor backend
echo [INFO] Iniciando servidor backend (Puerto 5000)...
cd /d "%~dp0server"
start "EventAI Backend" cmd /k "echo Backend EventAI iniciado en Puerto 5000 && node src/app.js"
:: Esperar un momento para que el backend arranque
timeout /t 3 >nul
:: Iniciar el frontend
echo [INFO] Iniciando frontend React (Puerto 3000)...
cd /d "%~dp0client"
start "EventAI Frontend" cmd /k "echo Frontend EventAI iniciado en Puerto 3000 && npm start"
echo.
echo ==========================================
echo EventAI Chatbot - INICIADO
echo ==========================================
echo [BACKEND] http://localhost:5000
echo [FRONTEND] http://localhost:3000
echo.
echo Presiona cualquier tecla para salir de este script...
pause >nul