File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
# set instrument to `True` to accept connections from the official Socket.IO
4
4
# Admin UI hosted at https://admin.socket.io
5
- instrument = False
5
+ instrument = True
6
6
admin_login = {
7
7
'username' : 'admin' ,
8
8
'password' : 'python' , # change this to a strong secret for production use!
@@ -93,4 +93,14 @@ def test_disconnect(sid, reason):
93
93
94
94
95
95
if __name__ == '__main__' :
96
+ if instrument :
97
+ print ('The server is instrumented for remote administration.' )
98
+ print (
99
+ 'Use the official Socket.IO Admin UI at https://admin.socket.io '
100
+ 'with the following connection details:'
101
+ )
102
+ print (' - Server URL: http://localhost:5000' )
103
+ print (' - Username:' , admin_login ['username' ])
104
+ print (' - Password:' , admin_login ['password' ])
105
+ print ('' )
96
106
uvicorn .run (app , host = '127.0.0.1' , port = 5000 )
Original file line number Diff line number Diff line change 5
5
6
6
# set instrument to `True` to accept connections from the official Socket.IO
7
7
# Admin UI hosted at https://admin.socket.io
8
- instrument = False
8
+ instrument = True
9
9
admin_login = {
10
10
'username' : 'admin' ,
11
11
'password' : 'python' , # change this to a strong secret for production use!
@@ -99,6 +99,16 @@ def disconnect(sid, reason):
99
99
100
100
101
101
if __name__ == '__main__' :
102
+ if instrument :
103
+ print ('The server is instrumented for remote administration.' )
104
+ print (
105
+ 'Use the official Socket.IO Admin UI at https://admin.socket.io '
106
+ 'with the following connection details:'
107
+ )
108
+ print (' - Server URL: http://localhost:5000' )
109
+ print (' - Username:' , admin_login ['username' ])
110
+ print (' - Password:' , admin_login ['password' ])
111
+ print ('' )
102
112
if sio .async_mode == 'threading' :
103
113
# deploy with Werkzeug
104
114
app .run (threaded = True )
You can’t perform that action at this time.
0 commit comments