Vikas01 commited on
Commit
402ff81
·
1 Parent(s): 466efd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -20,6 +20,12 @@ app = Flask(__name__)
20
 
21
  app.config['SECRET_KEY'] = 'secret!'
22
  socket = SocketIO(app,async_mode="eventlet")
 
 
 
 
 
 
23
  # @app.route('/at')
24
  # def attend():
25
  # # Face recognition variables
@@ -130,6 +136,6 @@ def index():
130
 
131
  if __name__ == '__main__':
132
  # Start Flask application
133
- socket.run(app,host='0.0.0.0', debug=True, port=5000)
134
 
135
 
 
20
 
21
  app.config['SECRET_KEY'] = 'secret!'
22
  socket = SocketIO(app,async_mode="eventlet")
23
+
24
+ @socket.on("connect")
25
+ def test_connect():
26
+ print("Connected")
27
+ emit("my response", {"data": "Connected"})
28
+
29
  # @app.route('/at')
30
  # def attend():
31
  # # Face recognition variables
 
136
 
137
  if __name__ == '__main__':
138
  # Start Flask application
139
+ socket.run(app,host='0.0.0.0', port=5000)
140
 
141