diff options
Diffstat (limited to 'server/config')
-rw-r--r-- | server/config/db.js | 16 |
1 files changed, 0 insertions, 16 deletions
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; |