Update mongoose to connect with credentials
This commit is contained in:
parent
9ae462fb85
commit
abb559db27
1 changed files with 3 additions and 1 deletions
|
@ -8,9 +8,11 @@ const {
|
|||
} = require("fs");
|
||||
const config = require("../config.json");
|
||||
const mongoose = require("mongoose");
|
||||
mongoose.connect(`${config.Storage.NubianDatabase}/nubian`, {
|
||||
mongoose.connect(`${config.Storage.NubianDatabase}/nubian?authSource=admin`, {
|
||||
useUnifiedTopology: true,
|
||||
useNewUrlParser: true,
|
||||
user: "admin",
|
||||
pass: process.env.NUBIAN_DATABASE_PASSWORD,
|
||||
});
|
||||
|
||||
const users = require("../schemas/user");
|
||||
|
|
Reference in a new issue