Skip to content

Commit c7b6c0c

Browse files
authored
Merge pull request makinhs#9 from Jopchumba/patch-1
Fix mongoose connection errors
2 parents 870eff3 + a17be28 commit c7b6c0c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

common/services/mongoose.service.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ const options = {
77
reconnectInterval: 500, // Reconnect every 500ms
88
poolSize: 10, // Maintain up to 10 socket connections
99
// If not connected, return errors immediately rather than waiting for reconnect
10-
bufferMaxEntries: 0
10+
bufferMaxEntries: 0,
11+
//geting rid off the depreciation errors
12+
useNewUrlParser: true,
13+
useUnifiedTopology: true
14+
1115
};
12-
1316
const connectWithRetry = () => {
1417
console.log('MongoDB connection with retry')
1518
mongoose.connect("mongodb://mongo:27017/rest-tutorial", options).then(()=>{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy