Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def index():
|
|
21 |
return render_template('index.html')
|
22 |
|
23 |
@socketio.on('connect')
|
24 |
-
def handle_connect():
|
25 |
sid = session.get('sid')
|
26 |
games[sid] = Game() # Create a new game instance
|
27 |
emit('update_game', games[sid].get_game_state())
|
@@ -56,4 +56,4 @@ def handle_disconnect():
|
|
56 |
if __name__ == '__main__':
|
57 |
# Use port 7860 for Hugging Face Spaces or environment variable
|
58 |
port = int(os.environ.get('PORT', 7860))
|
59 |
-
socketio.run(app,
|
|
|
21 |
return render_template('index.html')
|
22 |
|
23 |
@socketio.on('connect')
|
24 |
+
def handle_connect(auth=None): # Add auth parameter (can be None if not used)
|
25 |
sid = session.get('sid')
|
26 |
games[sid] = Game() # Create a new game instance
|
27 |
emit('update_game', games[sid].get_game_state())
|
|
|
56 |
if __name__ == '__main__':
|
57 |
# Use port 7860 for Hugging Face Spaces or environment variable
|
58 |
port = int(os.environ.get('PORT', 7860))
|
59 |
+
socketio.run(app, debug=True, host='0.0.0.0', port=port)
|