Skip to content

Commit 4be5a6a

Browse files
committed
simplify MongoDB connection options in server setup
1 parent b8b3759 commit 4be5a6a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

backend/server.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ app.use((err, req, res, next) => {
2727

2828
const connectDB = async () => {
2929
try {
30-
await mongoose.connect(process.env.MONGODB_URI, {
31-
useNewUrlParser: true,
32-
useUnifiedTopology: true,
33-
});
30+
await mongoose.connect(process.env.MONGODB_URI, {});
3431
console.log("Connected to MongoDB Atlas");
3532
} catch (err) {
3633
console.error("MongoDB connection error:", err);

0 commit comments

Comments
 (0)