You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The line of process.env.MONGO_URL = uri; passing connection string to the tested app, in the below connection code, but the app using this connection url get connection refused.
const connect = async () => {
var mongodb = require('mongo-mock');
var uri = 'mongodb://localhost:27017/myproject';
process.env.MONGO_URL = uri;
process.env.MDB_NAME = 'PricerDB_EMEA';
var MongoClient = mongodb.MongoClient;
MongoClient.connect(url, {}, function (err, client) {
db = client.db();
var collection = db.collection('adjustmentsDetails');
collection.insertOne({ "startOn": new Date("2020-07-10 15:00:00.000") })
})
}
The text was updated successfully, but these errors were encountered:
The line of process.env.MONGO_URL = uri; passing connection string to the tested app, in the below connection code, but the app using this connection url get connection refused.
const connect = async () => {
var mongodb = require('mongo-mock');
var uri = 'mongodb://localhost:27017/myproject';
process.env.MONGO_URL = uri;
process.env.MDB_NAME = 'PricerDB_EMEA';
var MongoClient = mongodb.MongoClient;
MongoClient.connect(url, {}, function (err, client) {
db = client.db();
var collection = db.collection('adjustmentsDetails');
collection.insertOne({ "startOn": new Date("2020-07-10 15:00:00.000") })
})
}
The text was updated successfully, but these errors were encountered: