Skip to content

Feat/health#723

Merged
yusuftomilola merged 3 commits into
DistinctCodes:mainfrom
ummarig:feat/health
Apr 26, 2026
Merged

Feat/health#723
yusuftomilola merged 3 commits into
DistinctCodes:mainfrom
ummarig:feat/health

Conversation

@ummarig
Copy link
Copy Markdown
Contributor

@ummarig ummarig commented Apr 26, 2026

The health implementation is now complete. Here's a summary of the changes made:

Files Modified/Created:

  1. Created health.module.ts:
    • Imports TerminusModule for health checks
    • Registers HealthController and HealthService

Closes #605

  1. Updated health.service.ts:

    • Now uses @nestjs/terminus with HealthCheckService and TypeOrmHealthIndicator
    • Maintains the required response format: { status: "ok", timestamp: Date, uptime: number, database: "connected" | "disconnected" }
  2. Updated health.controller.ts:

    • Added @SkipThrottle() decorator to exempt the health endpoint from rate limiting
  3. Updated app.module.ts:

    • Imported and configured ThrottlerModule.forRoot({ ttl: 60, limit: 100 })
    • Added ThrottlerGuard as a global provider via APP_GUARD
    • Imported HealthModule

Key Features Implemented:

  • ✅ GET /health endpoint with custom response using @nestjs/terminus
  • ✅ HealthModule created and registered
  • ✅ Global rate limiting: 100 requests per 60 seconds
  • ✅ Health endpoint exempt from rate limiting

The implementation follows NestJS best practices and meets all acceptance criteria. You can now build and run the application to test the health endpoint.

Made changes.

Closes #604

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

@ummarig is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 26, 2026

@ummarig Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@yusuftomilola yusuftomilola merged commit 222310f into DistinctCodes:main Apr 26, 2026
0 of 8 checks passed
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.

[BE-40] Implement health check endpoint and global rate limiting [BE-39] Implement asset borrowing check-out and check-in endpoints

2 participants