first commit
This commit is contained in:
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Local development script for Email Alerts Application
|
||||
# This script runs the application locally for testing
|
||||
|
||||
echo "🚀 Starting Email Alerts Application locally..."
|
||||
|
||||
# Check if virtual environment exists
|
||||
if [ ! -d "venv" ]; then
|
||||
echo "❌ Virtual environment not found. Creating one..."
|
||||
python3 -m venv venv
|
||||
fi
|
||||
|
||||
# Activate virtual environment
|
||||
echo "🔧 Activating virtual environment..."
|
||||
source venv/bin/activate
|
||||
|
||||
# Install dependencies if needed
|
||||
echo "📦 Installing dependencies..."
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Clear any cached Python files
|
||||
echo "🧹 Clearing Python cache..."
|
||||
find . -name "*.pyc" -delete 2>/dev/null || true
|
||||
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
|
||||
|
||||
# Check if port 5237 is available
|
||||
if lsof -Pi :5237 -sTCP:LISTEN -t >/dev/null ; then
|
||||
echo "⚠️ Port 5237 is already in use. Stopping existing process..."
|
||||
pkill -f "python.*run_server.py" 2>/dev/null || true
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
echo "🌐 Starting local server on port 5237..."
|
||||
echo "📱 Web interface will be available at: http://localhost:5237"
|
||||
echo "🔗 Dashboard: http://localhost:5237/"
|
||||
echo "⚙️ Settings: http://localhost:5237/settings"
|
||||
echo ""
|
||||
echo "💡 To test the connection:"
|
||||
echo " 1. Go to http://localhost:5237/settings"
|
||||
echo " 2. Enter Zoho credentials:"
|
||||
echo " Email: projects@manaknightdigital.com"
|
||||
echo " Password: 4o%!sbk\$(3!>@#567!!"
|
||||
echo " 3. Click 'Test Connection'"
|
||||
echo ""
|
||||
echo "🛑 Press Ctrl+C to stop the server"
|
||||
echo ""
|
||||
|
||||
# Start the server
|
||||
python run_server.py
|
||||
Reference in New Issue
Block a user