arya2004 / arya2004/facilitator

Add a Health Check Endpoint

Open
#9 2 comments 0 reactions 1 assignee Claimed by @IdrisKulubi View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.