feat(socketio): integrate SocketIO service for real-time communication and emit credits change events
This commit is contained in:
6
main.py
6
main.py
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user