mongoose + tests
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user