prince1604 commited on
Commit ·
a09c50d
1
Parent(s): 7e72c45
Add health check endpoint for uptime monitoring
Browse files
api.py
CHANGED
|
@@ -11,6 +11,14 @@ CORS(app)
|
|
| 11 |
|
| 12 |
REPORT_FILE = 'seo_report.json'
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
@app.route('/api/seo-report', methods=['GET', 'POST'])
|
| 15 |
def get_seo_report():
|
| 16 |
# Cache variable attached to function to persist state
|
|
|
|
| 11 |
|
| 12 |
REPORT_FILE = 'seo_report.json'
|
| 13 |
|
| 14 |
+
@app.route('/')
|
| 15 |
+
def home():
|
| 16 |
+
return "Antigravity API is Running. Use /health to check status."
|
| 17 |
+
|
| 18 |
+
@app.route('/health')
|
| 19 |
+
def health_check():
|
| 20 |
+
return jsonify({"status": "alive"}), 200
|
| 21 |
+
|
| 22 |
@app.route('/api/seo-report', methods=['GET', 'POST'])
|
| 23 |
def get_seo_report():
|
| 24 |
# Cache variable attached to function to persist state
|