0

I've already done my research and have gotten so far...

By entering the commands on mongoDB shell or node, this shows up: 2]

Now the problem is that I actually have users in this DB because I'm testing this on an application on port 3000 localhost. When I try to register the same user a second time, an error shows up, saying that this entry is duplicate.

TL;DR: Mongo says DB is empty when it's not

suigetsuh17
  • 55
  • 1
  • 7

1 Answers1

1

When you're in the database testForAuth, use the command db.users.find() and it should print out all the users.

  • Thanks! It actually worked! First time I used mongoDB, sorry for the newbie question (^.^*) Edit: If I may ask do you have experience in setting an online database? – suigetsuh17 Jun 07 '20 at 13:05
  • No worries glad I could help! Yes I do, I use MongoDB Atlas mostly. Heres a link to get started https://docs.atlas.mongodb.com/getting-started/ . – Brendan Musick Jun 07 '20 at 13:32
  • I dreaded I was gonna ask this, but I read the docs and I still need your help (^.^*) https://stackoverflow.com/questions/62269624/error-connecting-to-atlas-free-cluster-mongodb @brendan – suigetsuh17 Jun 08 '20 at 19:26