I have server.js and db.js The db.js file interacts with my database using Mongoose and I use server.js to call functions
server.js
db.js
I had
'MongoNetworkError', errorLabels: [ 'TransientTransactionError' ], [Symbol(mongoErrorContextSymbol)]:
I added my current IP to whiteList following "main page > security section > network access > add IP" in MongoDB website.
I hope this helps.