diff --git a/lib/server/plugnplay.ts b/lib/server/plugnplay.ts index db81fd1..0a56eb8 100644 --- a/lib/server/plugnplay.ts +++ b/lib/server/plugnplay.ts @@ -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);