SIDEL_ScriptsManager/scripts/run_app.py

34 lines
875 B
Python
Executable File

#!/usr/bin/env python3
"""
Run ScriptsManager application
"""
import sys
from pathlib import Path
# Add the project root to the Python path
project_root = Path(__file__).parent.parent
sys.path.insert(0, str(project_root))
from app.app import create_app, register_routes
def run_app():
"""Run the Flask application"""
app = create_app()
# Register all routes and get socketio instance
socketio = register_routes(app)
# Run with SocketIO support
socketio.run(app, host="0.0.0.0", port=5002, debug=True)
if __name__ == "__main__":
print("Starting ScriptsManager...")
print("🚀 Application will be available at: http://localhost:5002")
print("🔄 HOT-RELOAD ENABLED - Modify files and they will update automatically!")
print("Press Ctrl+C to stop the server")
print("-" * 50)
run_app()