From 1f853be5b9c07519cceeea9b7a5cbeee06756401 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Thu, 25 Jul 2024 11:07:20 +0530 Subject: new project --- server/config/db.js | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 server/config/db.js (limited to 'server/config') diff --git a/server/config/db.js b/server/config/db.js deleted file mode 100644 index 9ae3c6b..0000000 --- a/server/config/db.js +++ /dev/null @@ -1,16 +0,0 @@ -const mongoose = require('mongoose'); -require('dotenv').config(); - -const connectDB = async () => { - try { - await mongoose.connect(process.env.MONGO_URI, { - useNewUrlParser: true, - useUnifiedTopology: true, - }); - console.log('MongoDB connected...'); - } catch (err) { - console.error(err.message); - process.exit(1); - } -}; -module.exports = connectDB; -- cgit v1.2.3-59-g8ed1b