Enhance caching mechanism and logging configuration
- Updated .gitignore to include additional IDE and OS files, as well as log and web build directories. - Expanded config.sample.yaml to include cache configuration options for memory and Redis. - Modified wallamonitor.py to load cache configuration and initialize ArticleCache. - Refactored QueueManager to utilize ArticleCache for tracking notified articles. - Improved logging setup to dynamically determine log file path based on environment.
This commit is contained in:
63
web/start.sh
Executable file
63
web/start.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script para iniciar el servidor web de Wallamonitor
|
||||
|
||||
echo "🚀 Iniciando Wallamonitor Web Interface..."
|
||||
echo ""
|
||||
|
||||
# Verificar que Node.js esté instalado
|
||||
if ! command -v node &> /dev/null; then
|
||||
echo "❌ Node.js no está instalado. Por favor, instálalo primero."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verificar que npm esté instalado
|
||||
if ! command -v npm &> /dev/null; then
|
||||
echo "❌ npm no está instalado. Por favor, instálalo primero."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Instalar dependencias del backend si no existen
|
||||
if [ ! -d "backend/node_modules" ]; then
|
||||
echo "📦 Instalando dependencias del backend..."
|
||||
cd backend
|
||||
npm install
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# Instalar dependencias del frontend si no existen
|
||||
if [ ! -d "frontend/node_modules" ]; then
|
||||
echo "📦 Instalando dependencias del frontend..."
|
||||
cd frontend
|
||||
npm install
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# Iniciar backend en background
|
||||
echo "🔧 Iniciando backend..."
|
||||
cd backend
|
||||
npm start &
|
||||
BACKEND_PID=$!
|
||||
cd ..
|
||||
|
||||
# Esperar un poco para que el backend se inicie
|
||||
sleep 2
|
||||
|
||||
# Iniciar frontend
|
||||
echo "🎨 Iniciando frontend..."
|
||||
cd frontend
|
||||
npm run dev &
|
||||
FRONTEND_PID=$!
|
||||
cd ..
|
||||
|
||||
echo ""
|
||||
echo "✅ Servidores iniciados!"
|
||||
echo "📡 Backend: http://localhost:3001"
|
||||
echo "🎨 Frontend: http://localhost:3000"
|
||||
echo ""
|
||||
echo "Presiona Ctrl+C para detener los servidores"
|
||||
|
||||
# Esperar a que se presione Ctrl+C
|
||||
trap "kill $BACKEND_PID $FRONTEND_PID 2>/dev/null; exit" INT TERM
|
||||
wait
|
||||
|
||||
Reference in New Issue
Block a user