mirror of
https://github.com/SkalaraAI/waitlist.git
synced 2025-04-09 21:20:15 -04:00
update db
This commit is contained in:
parent
60183a37c5
commit
fb0685adf9
|
@ -12,9 +12,14 @@ let client =
|
|||
: { conn: null, promise: null };
|
||||
|
||||
if (!client.promise) {
|
||||
client.promise = MongoClient.connect(uri).then((mongoClient) => {
|
||||
client.promise = MongoClient.connect(uri)
|
||||
.then((mongoClient) => {
|
||||
client.conn = mongoClient;
|
||||
return mongoClient;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Failed to connect to MongoDB", error);
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user