arya2004 / arya2004/facilitator
Add a Health Check Endpoint
Open
good first issue
hacktoberfest
hacktoberfest-accepted
python
- Dominant language
- Python
- Stars
- 2
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
It's a common practice to have a simple endpoint that can be used to verify that the service is running.
**Task:** Add a `/health` route to main.py that returns a simple JSON response with a `200 OK` status.
```python
# ...existing code...
@app.route("/health", methods=["GET"])
def health_check():
"""Health check endpoint to verify the service is running."""
return jsonify({"status": "ok"}), 200
if __name__ == "__main__":
app.run(debug=True, port=os.getenv("PORT", default=5000))
```
Contributor guide
Assessment
This issue has not been assessed yet.