We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 687f035 commit bbdb768Copy full SHA for bbdb768
1 file changed
src/Servers/FlaskServer/app.py
@@ -1,13 +1,16 @@
1
import sys
2
from flask import Flask
3
+from werkzeug.routing import Rule
4
5
app = Flask(__name__)
6
-@app.route("/", defaults={"path": ""})
7
-@app.route("/<path:path>")
+app.url_map.add(Rule('/', defaults={"path": ""}, endpoint='catch_all'))
8
+app.url_map.add(Rule('/<path:path>', endpoint='catch_all'))
9
+
10
+@app.endpoint('catch_all')
11
def catch_all(path):
12
return "OK"
13
14
if __name__ == "__main__":
- port = int(sys.argv[1]) if len(sys.argv) > 1 else 9002
15
+ port = int(sys.argv[1]) if len(sys.argv) > 1 else 8080
16
app.run(host="0.0.0.0", port=port)
0 commit comments