Skip to content

feat: Add MongoDB health monitoring endpoint and harden auth routes with strict rate limiting#321

Open
yash1616-accept wants to merge 2 commits into
hagopj13:masterfrom
yash1616-accept:master
Open

feat: Add MongoDB health monitoring endpoint and harden auth routes with strict rate limiting#321
yash1616-accept wants to merge 2 commits into
hagopj13:masterfrom
yash1616-accept:master

Conversation

@yash1616-accept

Copy link
Copy Markdown

Description

This pull request introduces two crucial production-grade features to enhance the boilerplate's out-of-the-box monitoring and security posture:

  1. Database Health Monitor (/v1/health): A dynamic endpoint that checks mongoose.connection.readyState and returns a 200 OK or 503 Degraded status along with system uptime and timestamps.
  2. Authentication Rate Limiting: Hardens sensitive routes (/v1/auth/register and /v1/auth/login) against brute-force attacks by restricting rapid consecutive requests using express-rate-limit.

Validation & Testing

  • Added comprehensive integration tests in tests/integration/health.test.js.
  • Validated all tests using Jest; integration test suites pass successfully.

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