Skip to content

AddNew - #219

Open
Dev5112 wants to merge 2 commits into
vicharanashala:mainfrom
Dev5112:main
Open

AddNew#219
Dev5112 wants to merge 2 commits into
vicharanashala:mainfrom
Dev5112:main

Conversation

@Dev5112

@Dev5112 Dev5112 commented Aug 17, 2026

Copy link
Copy Markdown

No description provided.

@Dev5112

Dev5112 commented Aug 17, 2026

Copy link
Copy Markdown
Author

I added two small utility features to the backend in the backend/src/index.ts file:

  1. Health Check Endpoint (/api/health)
    This provides a simple way to monitor if the server is running correctly. When a GET request is made to /api/health, it returns a JSON response containing:
  • status: Always "OK" if the server is responsive.
  • uptime: How long the server process has been running (in seconds).
  • timestamp: The current server time.
    (This is often used by monitoring tools to ensure the server hasn't crashed).
  1. Version Endpoint (/api/version)
    This provides metadata about the currently running instance of the application. When a GET request is made to /api/version, it returns:
  • version: The current version of the software (e.g., "1.0.0").
  • environment: Indicates whether the server is running in "development" or "production" mode based on the environment variables.

Both were added right before the other API routes are registered. You can see the exact code in your open backend/src/index.ts file!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant