0

I keep on trying to implement MongoDB in my code using Mongoose, but in most of my commands that I add it in, it returns with either 'Topology was destroyed' or 'Topology was closed' and I can't find a way to fix the problem.

I followed along with tutorials on YT from (Worn Off keys) and changed it a bit and it didn't seem to work, and then I copied and pasted his one to see if it works but I get the same error.

Is there something I should check that I might have done wrong like in the schemas or connecting to MongoDB(even though I followed what was said in the videos) please let me know?

kgangadhar
  • 4,886
  • 5
  • 36
  • 54
felarck
  • 1
  • 2
  • Does this answer your question? [mongoError: Topology was destroyed](https://stackoverflow.com/questions/30909492/mongoerror-topology-was-destroyed) – T. Dirks Dec 15 '20 at 12:35
  • Compare your code to official documentation carefully, most likely you got the scopes wrong on various operations. – D. SM Dec 17 '20 at 01:06

0 Answers0