Spaces:
Running
Running
Create health.py
Browse files
health.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from flask import Flask
|
| 2 |
+
|
| 3 |
+
app = Flask(__name__)
|
| 4 |
+
|
| 5 |
+
@app.route("/")
|
| 6 |
+
def home():
|
| 7 |
+
return "OK - rotating-mitmproxy is running"
|
| 8 |
+
|
| 9 |
+
@app.route("/health")
|
| 10 |
+
def health():
|
| 11 |
+
return {"status": "ok"}
|
| 12 |
+
|
| 13 |
+
if __name__ == "__main__":
|
| 14 |
+
app.run(host="0.0.0.0", port=7860)
|
| 15 |
+
|