summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-03 16:02:28 +0530
committerBobby <[email protected]>2026-03-03 16:02:28 +0530
commitc370e302edf99c5a230800b2ff6f4612642121d8 (patch)
tree23eda9be6873e2663719981fae87d70aee3ef037 /src/scripts
parenteb332a9697e80d8ba138e51cc8de234dad59b0bd (diff)
downloadpagoda-c370e302edf99c5a230800b2ff6f4612642121d8.tar.xz
pagoda-c370e302edf99c5a230800b2ff6f4612642121d8.zip
feat: Implement middleware for HTTP logging and request context
- Added httpLogger middleware to log HTTP requests with status, method, IP, and duration. - Introduced request middleware to build and store request context. - Created a centralized middleware initialization function. - Enhanced logging functionality with different log levels based on HTTP status codes. feat: Set up routing with error handling - Established a router package to manage application routes. - Implemented a custom error handler to respond with appropriate error messages. - Added sample route for a hello endpoint with authentication requirement. feat: Introduce utility functions for environment variable management - Developed functions to retrieve and parse environment variables with default values. - Implemented a parser to populate configuration structs from environment variables. feat: Create structured logging with zap - Integrated zap logger for structured logging with customizable log levels and formats. - Added color-coded log messages for better visibility in the console. feat: Build request metadata utilities - Created utilities to build and manage request metadata, including query parameters, headers, and route parameters. - Implemented a facade pattern for easier access to request data. feat: Enhance URL management with namespaces - Developed a URL management system to handle route registration with namespaces. - Added functionality to retrieve full paths for registered routes. chore: Initialize database and application structure - Set up initial application structure with main entry point and middleware integration. - Created a database connection handler for graceful shutdown.
Diffstat (limited to 'src/scripts')
0 files changed, 0 insertions, 0 deletions