broadfield-dev commited on
Commit
b3f4a8c
·
verified ·
1 Parent(s): 6cdbca1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, allow_unsafe_werkzeug=True, host='0.0.0.0', port=port)
 
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)