Skip to content

[FEATURE REQUEST] - Add Health Check EndpointΒ #43

@rishyym0927

Description

@rishyym0927

πŸš€ 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! πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions