forked from cvalverd/batch-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-server.sh
More file actions
executable file
·54 lines (47 loc) · 1.6 KB
/
start-server.sh
File metadata and controls
executable file
·54 lines (47 loc) · 1.6 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
46
47
48
49
50
51
52
53
54
#!/bin/bash
# ==================================================
# SCRIPT PARA EJECUTAR EL SERVIDOR BFF
# ==================================================
echo "🏦 INICIANDO SERVIDOR BANCARIO BFF..."
echo "=================================================="
echo ""
# Verificar si el puerto 8080 está ocupado
if lsof -Pi :8080 -sTCP:LISTEN -t >/dev/null ; then
echo "⚠️ Puerto 8080 ya está en uso"
echo "🔍 Procesos usando el puerto 8080:"
lsof -Pi :8080 -sTCP:LISTEN
echo ""
echo "💡 Para detener el proceso existente:"
echo " kill \$(lsof -t -i:8080)"
echo ""
read -p "¿Deseas continuar de todas formas? (y/N): " respuesta
if [[ ! $respuesta =~ ^[Yy]$ ]]; then
echo "❌ Operación cancelada"
exit 1
fi
fi
echo "🚀 Compilando proyecto..."
./mvnw clean compile -q
if [ $? -eq 0 ]; then
echo "✅ Compilación exitosa"
else
echo "❌ Error en compilación"
exit 1
fi
echo ""
echo "🌟 Iniciando servidor en modo BFF..."
echo "=================================================="
echo "🌐 API Web BFF: http://localhost:8080/api/web/"
echo "📱 API Mobile BFF: http://localhost:8080/api/mobile/"
echo "🏧 API ATM BFF: http://localhost:8080/api/atm/"
echo "📖 Documentación: http://localhost:8080/swagger-ui.html"
echo "=================================================="
echo ""
echo "💡 Para probar los endpoints, ejecuta en otra terminal:"
echo " ./test-bffs.sh"
echo ""
echo "💡 Para detener el servidor: Ctrl+C"
echo "=================================================="
echo ""
# Ejecutar el servidor
./mvnw spring-boot:run