diff --git a/server/mongo.js b/server/mongo.js index 97904e3..fb3bd27 100644 --- a/server/mongo.js +++ b/server/mongo.js @@ -3,10 +3,10 @@ const env = require('./env/environment'); mongoose.Promise = global.Promise; -const mongoUri = `mongodb://${env.dbName}:${env.key}@${env.dbName}.documents.azure.com:${env.cosmosPort}/?ssl=true`; +const mongoUri = `mongodb://${env.dbName}.documents.azure.com:${env.cosmosPort}/?ssl/=true`; function connect() { - return mongoose.connect(mongoUri, { useMongoClient: true }); + return mongoose.connect(mongoUri, { auth: { user: env.dbName, password: env.key }}); } module.exports = {