This pull request refactors the database connection logic by moving it from the main application file (app.js) to a separate module (db.js). This change aims to improve the modularity and readability of the codebase.
Summary
Extracted MongoDB connection logic from app.js to a new file db.js.
The db.js module exports the connected database instance.
Simplified app.js by removing direct MongoDB connection setup and replacing it with a single require statement for the new db.js module.
Ensured that all configurations and options related to the database connection are preserved in the transition.
This refactor makes future database-related modifications more centralized and easier to manage.
Fixes #6.
🎉 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 (click)
Description
This pull request refactors the database connection logic by moving it from the main application file (
app.js
) to a separate module (db.js
). This change aims to improve the modularity and readability of the codebase.Summary
app.js
to a new filedb.js
.db.js
module exports the connected database instance.app.js
by removing direct MongoDB connection setup and replacing it with a singlerequire
statement for the newdb.js
module.Fixes #6.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.