фикс
This commit is contained in:
@@ -2,10 +2,10 @@ const mongoose = require('mongoose');
|
||||
|
||||
const connectDB = async () => {
|
||||
try {
|
||||
const mongoUri = process.env.MONGODB_URI || 'mongodb://localhost:27017/procurement_db';
|
||||
const mongoUri = process.env.MONGODB_URI || 'mongodb://admin:password@localhost:27017/procurement_db?authSource=admin';
|
||||
|
||||
console.log('\n📡 Попытка подключения к MongoDB...');
|
||||
console.log(` URI: ${mongoUri}`);
|
||||
console.log(` URI: ${mongoUri.replace(/\/\/:.*@/, '//***:***@')}`);
|
||||
|
||||
const connection = await mongoose.connect(mongoUri, {
|
||||
useNewUrlParser: true,
|
||||
|
||||
Reference in New Issue
Block a user