diff --git a/server/utils/mongo.ts b/server/utils/mongo.ts index e98dfac..59344d0 100644 --- a/server/utils/mongo.ts +++ b/server/utils/mongo.ts @@ -6,13 +6,13 @@ const dbInstanses = { } console.log('=======================================================') -console.log('mongoUrl', mongoUrl) +console.log(`mongoUrl ->${mongoUrl}<-`) console.log('=======================================================') const mongoDBConnect = async () => { try { - const MongoClient = new MDBClient(mongoUrl, {}) + const MongoClient = new MDBClient(mongoUrl) const client = await MongoClient.connect() console.log('Подключение к MongoDB успешно') return client diff --git a/server/utils/mongoose.ts b/server/utils/mongoose.ts index 257b430..bbfaf12 100644 --- a/server/utils/mongoose.ts +++ b/server/utils/mongoose.ts @@ -3,11 +3,11 @@ import mongoose from 'mongoose' import { mongoUrl } from './const' console.log('=======================================================') -console.log('mongoUrl2', mongoUrl) +console.log(`mongoUrl ->${mongoUrl}<-`) console.log('=======================================================') -mongoose.connect(`${mongoUrl}`).then(() => { +mongoose.connect(mongoUrl).then(() => { console.log('Подключение к MongoDB успешно') }).catch((err) => { console.log('Неудачная попытка подключения к MongoDB')