🚀 Overview
The backend currently lacks a health check endpoint. Adding a /health endpoint will allow monitoring tools and developers to check if the application is running and if the database connection is healthy.
🛠 Use Case
- Helps in monitoring the application's uptime.
- Enables automated health checks for load balancers and orchestrators.
- Allows developers to quickly diagnose issues with the backend or database.
📊 Expected Behavior
- Create a new file
healthCheck.go in the controllers folder.
- Implement a handler function that:
- Returns 200 OK if the application is running.
- Uses
DB.Ping() to check the database connection and includes the result in the response.
- Add a /health route in the router.
- Test the endpoint using Postman or curl.
🛠 Skills Required
- Go programming
- HTTP routing in Go
- Database connection handling
Thank you for contributing to StoreHUB! 👨💻👩💻
🚀 Overview
The backend currently lacks a health check endpoint. Adding a
/healthendpoint will allow monitoring tools and developers to check if the application is running and if the database connection is healthy.🛠 Use Case
📊 Expected Behavior
healthCheck.goin thecontrollersfolder.DB.Ping()to check the database connection and includes the result in the response.🛠 Skills Required
Thank you for contributing to StoreHUB! 👨💻👩💻