I can't connect to my app and it was working fine yesterday. I cant figure out why it's not working. I am running it locally, I have closed all ports and reset everything. I know this question isn't very direct but is their anything I should check in my code that I am missing based on this error?
I closed all ports, checked for connection string to link to MongoDB and changed and double checked my password. I might need to add some error handling catch()
block but I wouldn't even know what and where to add it.
(node:24667) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [cluster0-shard-00-02-stguw.azure.mongodb.net:27017] on first connect [MongoNetworkError: connection 5 to cluster0-shard-00-02-stguw.azure.mongodb.net:27017 closed]
at Pool.<anonymous> (/home/mat/code/goneGo/node_modules/mongodb-core/lib/topologies/server.js:431:11)
at Pool.emit (events.js:198:13)
at connect (/home/mat/code/goneGo/node_modules/mongodb-core/lib/connection/pool.js:557:14)
at callback (/home/mat/code/goneGo/node_modules/mongodb-core/lib/connection/connect.js:109:5)
at runCommand (/home/mat/code/goneGo/node_modules/mongodb-core/lib/connection/connect.js:129:7)
at Connection.errorHandler (/home/mat/code/goneGo/node_modules/mongodb-core/lib/connection/connect.js:321:5)
at Object.onceWrapper (events.js:286:20)
at Connection.emit (events.js:198:13)
at TLSSocket.<anonymous> (/home/mat/code/goneGo/node_modules/mongodb-core/lib/connection/connection.js:350:12)
at Object.onceWrapper (events.js:286:20)
at TLSSocket.emit (events.js:198:13)
at _handle.close (net.js:606:12)
at TCP.done (_tls_wrap.js:388:7)
(node:24667) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:24667) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I expect to type nodemon, and node spits out "connected at local host 3000 at port 27017 with 0 thing".