visheshrwl / Uber-like

2 stars 5 forks source link

Create health.ts #18

Closed Aryam2121 closed 22 hours ago

Aryam2121 commented 1 day ago

Health Router:

The health check endpoint (/health) uses a GET request. It attempts to check the database connection. If it fails, it catches the error and returns an unhealthy status with an error message. If the check passes, it returns a JSON response with the health status, application version, and uptime.solve issue #3

All Submissions:

Type of change

Please delete options that are not relevant.

After these steps, you're ready to open a pull request.

a. Give a descriptive title to your PR.

b. Describe your changes.

c. Put `closes #3` in your comment to auto-close the issue that your PR fixes (if such).