feat(socketio): integrate SocketIO service for real-time communication and emit credits change events

This commit is contained in:
JSC
2025-07-04 20:18:46 +02:00
parent 1cd43a670d
commit ccc5ee38e2
6 changed files with 266 additions and 30 deletions

View File

@@ -1,15 +1,15 @@
from dotenv import load_dotenv
from app import create_app
from app import create_app, socketio
# Load environment variables from .env file
load_dotenv()
def main() -> None:
"""Run the Flask application."""
"""Run the Flask application with SocketIO."""
app = create_app()
app.run(debug=True, host="0.0.0.0", port=5000)
socketio.run(app, debug=True, host="0.0.0.0", port=5000, allow_unsafe_werkzeug=True)
if __name__ == "__main__":