From 950d33d0034c6c35b1aed13a35f21e0ab98e98f7 Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Sun, 16 May 2021 13:02:24 +0200 Subject: [PATCH] Make db slaves ok --- database/mongo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/mongo.js b/database/mongo.js index a0d97fe..857a8c1 100644 --- a/database/mongo.js +++ b/database/mongo.js @@ -11,6 +11,7 @@ dbClient.connect(e => { console.error(e); return process.exit(); } + dbClient.slaveOk(); console.log("Database connected!"); }); @@ -19,4 +20,4 @@ const database = dbClient.db("Shasha"); /** * @type {dbClient: MongoClient, database: Db} */ -module.exports = { dbClient, database } \ No newline at end of file +module.exports = { dbClient, database }