refactor(server/plugins): add user and password to mongoose connect options
This commit is contained in:
parent
494db75430
commit
696ce44290
@ -12,8 +12,15 @@ export default async function () {
|
||||
log.debug(mongoose.connection.modelNames());
|
||||
// mongoose.set("debug", true);
|
||||
mongoose.set("overwriteModels", true);
|
||||
console.log(process.env);
|
||||
try {
|
||||
await mongoose.connect(beep.database.uri);
|
||||
await mongoose.connect(beep.database.uri, {
|
||||
auth: {
|
||||
username: beep.database.user,
|
||||
password: beep.database.password,
|
||||
},
|
||||
authSource: "admin",
|
||||
});
|
||||
// if (!!!mongoose.connections.length)
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
Loading…
Reference in New Issue
Block a user