diff --git a/server/dbconnection.ts b/server/dbconnection.ts index 479b693c..50569b3a 100644 --- a/server/dbconnection.ts +++ b/server/dbconnection.ts @@ -19,6 +19,9 @@ export const initialize = async (connectionString: string): Promise => { await mongoClient.connect(); const db = mongoClient.db(); await db.command({ ping: 1 }); + const users = db.collection("users"); + // Ensure we can read from users + await users.findOne(); console.log("Connected successfully to database."); return; };