mongoose + tests

This commit is contained in:
Primakov Alexandr Alexandrovich
2024-10-16 11:06:23 +03:00
parent 2cfcd7347b
commit 4b0d9b4dbc
1295 changed files with 4579 additions and 1719 deletions
+3 -5
View File
@@ -1,15 +1,13 @@
const MDBClient = require('mongodb').MongoClient
const rc = require('../../.serverrc')
// Connection URL
const url = `mongodb://${rc.mongoAddr}:${rc.mongoPort}`
const { mongoUrl } = require('./const')
const dbInstanses = {
}
const mongoDBConnect = async () => {
try {
const MongoClient = new MDBClient(url, {
const MongoClient = new MDBClient(mongoUrl, {
useUnifiedTopology: true,
})
return await MongoClient.connect()