Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions database/MongoDB.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Assuming the original file looked like this:

const mongoose = require("mongoose");
const unusedVariable = "I am not used anywhere";
// Removed unused import and variable
const MongoClient = require("mongodb").MongoClient;

MongoClient.connect("mongodb://localhost:27017/mydb", function (err, db) {
Expand All @@ -19,7 +18,7 @@ MongoClient.connect("mongodb://localhost:27017/mydb", function (err, db) {
console.log("Database created!");
db.close();
});
const mongoose = require("mongoose");
// Removed unused import

const connectDB = async () => {
try {
Expand Down