aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-07-18 15:02:30 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-07-18 15:02:30 +0530
commite29e20ce87c16aa83aaab66ae151bce8705d7ee5 (patch)
treefcd3c5657975c61eeddceb2aec3524ef999b5054
parent2f613682b733f8f03634df08270469830cad1800 (diff)
downloadadmin-panel-e29e20ce87c16aa83aaab66ae151bce8705d7ee5.tar.gz
admin-panel-e29e20ce87c16aa83aaab66ae151bce8705d7ee5.tar.bz2
admin-panel-e29e20ce87c16aa83aaab66ae151bce8705d7ee5.zip
updated server/config/db.js
-rw-r--r--server/config/db.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/server/config/db.js b/server/config/db.js
index effbe5e..c1f628a 100644
--- a/server/config/db.js
+++ b/server/config/db.js
@@ -1,14 +1,14 @@
-const mongoose = require('mongoose')
-const connecttDB = 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);
- }
+const mongoose = require('mongoose');
+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;