1 files changed, 5 insertions, 2 deletions
diff --git a/src/db/db.js b/src/db/db.js
index b9a425c..2035731 100644
--- a/src/db/db.js
+++ b/src/db/db.js
@@ -1,11 +1,14 @@
-import { connect } from 'mongoose';
+import mongoose, { connect } from 'mongoose';
import { readSecret } from '#util/secretUtils.js';
export async function initDb() {
const connectionString = await readSecret(
- "MongoDB connection string",
+ 'MongoDB connection string',
process.env['DATABASE_SECRET_PATH']
);
+
+ if (process.env['LOG_QUERIES']) mongoose.set('debug', true);
+
try {
const res = await connect(connectionString);
if (res.connection.readyState === 1) {
|