This pull request addresses an issue where the logRequest middleware was not being properly applied to all incoming requests. Previously, it was only being manually called within the root route handler, which limited its utility and effectiveness.
Summary
Moved the logRequest middleware to be globally used across all routes by adding app.use(logRequest); at the top level of app.js. This ensures that all incoming requests, regardless of the route, are logged appropriately.
Removed the redundant manual call of logRequest(req, res); from the root route handler (app.get("/")). Since the middleware is now globally applied, this call is no longer necessary.
These changes improve the maintainability of the code and ensure consistent logging across all routes.
Files Modified:
app.js: Added global middleware usage and removed redundant manual middleware call.
Fixes #44.
π Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback: π
Description
This pull request addresses an issue where the
logRequest
middleware was not being properly applied to all incoming requests. Previously, it was only being manually called within the root route handler, which limited its utility and effectiveness.Summary
logRequest
middleware to be globally used across all routes by addingapp.use(logRequest);
at the top level ofapp.js
. This ensures that all incoming requests, regardless of the route, are logged appropriately.logRequest(req, res);
from the root route handler (app.get("/")
). Since the middleware is now globally applied, this call is no longer necessary.Files Modified:
app.js
: Added global middleware usage and removed redundant manual middleware call.Fixes #44.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.