Added logging feature using morgan#56
Conversation
gbowne1
left a comment
There was a problem hiding this comment.
I checked out this change locally for testing and review for merge
It appears to work as intended per the issue description and the PR description.
It does not seem to cause any other issues either.
I was able to get it to do logging easily from this point
Approving this PR for merge pending further review by collaborators and other maintainers
Thanks for the opportunity to review your PR and for your contribution to this project
|
@Haseebx162006 can you please resolve the merge conflicts? Rest of the changes look good and the PR is ready to be merged. |
|
I have resolved the merge conflicts |
|
@Ved178 you can check |
|
@gbowne1 i think every active collaborator has checked this. And i have merged the conflict's so this pr is eligible to be merged |
|
@Haseebx162006 @Ved178 @shishir-21 @glenjaysondmello This might need another round of rebase etc Make sure everyone is synced up to latest I reviewed locally again and it seems good Thanks |
Key Changes
1. Logging Feature
Added: Integrated morgan middleware in server.js with the 'dev' format to log all incoming HTTP requests (Method, Status, Response Time).
2. Server Stability and Fixes
Robust Database Connection: Updated server.js to skip the MongoDB connection if MONGODB_URI is undefined. This allows the server to run in "Mock Mode" (serving the JSON file) without crashing when no database is configured.
Testing
1.Verified that npm run api starts the server successfully without errors.
2.Confirmed that HTTP requests are visible in the terminal logs.
3.Verified that the frontend loads streams correctly on the first visit.
@gbowne1 you are requested to review this code. I would futher love to work on this project