Description
Add PostgreSQL as the primary database with connection pooling and health checks.
Requirements and context
- Must use a supported Node.js PostgreSQL client (e.g. pg or Prisma)
- Should configure connection pool size and timeouts
- Must expose health check for DB connectivity
- Should support migrations strategy
- Must be tested and documented
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/postgres-connection
-
Implement changes
- Add DB module:
src/db/index.ts
- Add pool config and health check
- Write comprehensive tests:
src/db/index.test.ts
- Add documentation:
docs/database.md
- Include JSDoc comments
-
Test and commit
- Run tests
- Cover connection, pool exhaustion, health
- Include test output
Example commit message:
feat: add PostgreSQL connection and connection pool
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Add PostgreSQL as the primary database with connection pooling and health checks.
Requirements and context
Suggested execution
Implement changes
src/db/index.tssrc/db/index.test.tsdocs/database.mdTest and commit
Example commit message:
Guidelines