feat(08-01): Health monitoring & logging infrastructure
- Set up Winston structured logging with console and file outputs - Create GET /api/health endpoint with uptime, database status, response times - Add request logging middleware (method, path, statusCode, duration) - Create health monitoring module with database connectivity checks - Log all HTTP requests with timing information - Log auth events (login, register) and data modifications - Replace console.log/error with structured logger calls - Update backend README with logging configuration documentation - Add tests for health endpoint and logging middleware - Logs directory: logs/combined.log and logs/error.log Deliverables met: ✓ Structured logging (Winston) integrated ✓ Enhanced health endpoint with uptime & database info ✓ Request logging middleware attached to all routes ✓ Comprehensive logging documentation in README.md ✓ Tests passing for health and logging functionality ✓ All critical operations logged with context
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.18.2",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"pg": "^8.11.3"
|
||||
"pg": "^8.11.3",
|
||||
"winston": "^3.19.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^3.0.2",
|
||||
|
||||
Reference in New Issue
Block a user