Skip to content

Commit b3aa543

Browse files
committed
feat: agregar scripts de instalación y inicio del proyecto
1 parent cd88c5b commit b3aa543

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

install.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
echo "🚀 Instalando dependencias del proyecto..."
4+
5+
# Instalar dependencias del servidor
6+
echo ""
7+
echo "📦 Instalando dependencias del servidor..."
8+
cd server
9+
npm install
10+
cd ..
11+
12+
# Instalar dependencias del cliente
13+
echo ""
14+
echo "📦 Instalando dependencias del cliente..."
15+
cd client
16+
npm install
17+
cd ..
18+
19+
echo ""
20+
echo "✅ ¡Instalación completa!"
21+
echo "Ejecuta ./start.sh para iniciar el proyecto"

start.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
echo "🚀 Iniciando proyecto..."
4+
5+
# Función para manejar Ctrl+C
6+
cleanup() {
7+
echo ""
8+
echo "⏹️ Deteniendo servicios..."
9+
kill 0
10+
exit
11+
}
12+
13+
trap cleanup SIGINT
14+
15+
# Iniciar servidor en segundo plano
16+
echo "🔧 Iniciando servidor..."
17+
cd server
18+
npm run dev &
19+
SERVER_PID=$!
20+
21+
# Esperar un momento para que el servidor inicie
22+
sleep 2
23+
24+
# Iniciar cliente en segundo plano
25+
echo "🎨 Iniciando cliente..."
26+
cd ../client
27+
npm run dev &
28+
CLIENT_PID=$!
29+
30+
echo ""
31+
echo "✅ Servicios iniciados:"
32+
echo " - Servidor: http://localhost:3000"
33+
echo " - Cliente: http://localhost:5173"
34+
echo ""
35+
echo "Presiona Ctrl+C para detener ambos servicios"
36+
37+
# Esperar a que ambos procesos terminen
38+
wait

0 commit comments

Comments
 (0)