alptangall commited on
Commit
8d7b8d6
·
verified ·
1 Parent(s): c77371e

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +19 -0
server.py CHANGED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask
2
+ from threading import Thread
3
+ import sys
4
+
5
+
6
+ app = Flask('')
7
+
8
+ @app.route('/')
9
+ def main():
10
+ return 'Bot ready!'
11
+ sys.exit("Error message")
12
+
13
+ def run():
14
+ app.run(host='0.0.0.0', port=8888)
15
+
16
+ def b():
17
+ server = Thread(target=run)
18
+ server.start()
19
+