I’m about to start a MERN app but my skills were a bit rusty so I looked up several tutorials on how to start the project. However, I realized that I was stuck at this point when I logged in my MongoDB account which is on Atlas. There, I created a new project and then a cluster. I followed the steps like this tutorial (Learn the MERN stack by building an exercise tracker — MERN Tutorial | by Beau Carnes | Medium) said to get the connection string. However, the point that I’m stuck on is the <dbname>
in the string which wasn’t in the example picture in the tutorial. So I’m confused. Do I need to create a database as well or what? What do I do for the <dbname>
in the string?
Is there any other way to connect like using MongoDB Compass? I tried looking for tutorials that use Compass but I can’t find it…
In the tutorial:
My code screenshot: