ludo web based game config file changes
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
module.exports = function (mongoose) {
|
||||
mongoose.set('useFindAndModify', false);
|
||||
mongoose
|
||||
.connect(process.env.CONNECTION_URI, {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
dbName: 'test',
|
||||
})
|
||||
.then(() => {
|
||||
console.log('MongoDB Connected…');
|
||||
})
|
||||
.catch(err => console.error(err));
|
||||
module.exports = async function (mongoose) {
|
||||
try {
|
||||
await mongoose.connect(process.env.CONNECTION_URI);
|
||||
console.log('✅ MongoDB connected');
|
||||
} catch (err) {
|
||||
console.error('❌ MongoDB connection error:', err);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user