mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-02-04 14:39:02 +08:00
added message if database connection is not working
This commit is contained in:
parent
9671c8115d
commit
ecc91f8fc4
1 changed files with 1 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ module.exports = {
|
|||
});
|
||||
},
|
||||
mongoDB() {
|
||||
if (!mongoClient) throw new Error("Database is offline");
|
||||
return mongoClient.db(process.env.DB_NAME);
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue