e09017d2e0
- 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
24 lines
494 B
JSON
24 lines
494 B
JSON
{
|
|
"name": "gravl-backend",
|
|
"version": "1.0.0",
|
|
"description": "Gravl Training App Backend",
|
|
"main": "src/index.js",
|
|
"scripts": {
|
|
"start": "node src/index.js",
|
|
"dev": "nodemon src/index.js",
|
|
"test": "node --test"
|
|
},
|
|
"dependencies": {
|
|
"bcryptjs": "^2.4.3",
|
|
"cors": "^2.8.5",
|
|
"express": "^4.18.2",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"pg": "^8.11.3",
|
|
"winston": "^3.19.0"
|
|
},
|
|
"devDependencies": {
|
|
"nodemon": "^3.0.2",
|
|
"supertest": "^6.3.3"
|
|
}
|
|
}
|