Antoni09 commited on
Commit
9446231
·
verified ·
1 Parent(s): b760154

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +7 -0
server.py CHANGED
@@ -35,6 +35,13 @@ ALLOWED_STATIC = {
35
 
36
 
37
  app = Flask(__name__, static_folder=str(APP_ROOT), static_url_path="")
 
 
 
 
 
 
 
38
 
39
  getcontext().prec = 10
40
 
 
35
 
36
 
37
  app = Flask(__name__, static_folder=str(APP_ROOT), static_url_path="")
38
+ @app.get("/")
39
+ def health():
40
+ return {"ok": True}
41
+ if __name__ == "__main__":
42
+ port = int(os.environ.get("PORT", "7860"))
43
+ app.run(host="0.0.0.0", port=port, debug=False) # ważne: bez debug/reloadera
44
+
45
 
46
  getcontext().prec = 10
47