yarn install
For the MongoDB workshops, we will be using mongoDB Atlas. It is a cloud DB service.
Go to mongodb.com and click Start Free.
Use the google signin to accelerate the process.
- Sign up with Google
- Accept Privacy Plicy and Terms...
- Create an organization
- Create a project
- Build a cluster
- Choose the FREE tier
- Accept the default settings
...your cluster is being created (This can take a few minutes.)
- Create a database called
exercise_1
- Create a collection called
users
- Select 'Database Access' from the sidebar
- Add a new Database User
- Use
Password
for the authentication method. - create a username and password (use the
Autogenerate Secure Password
option) - copy that password and paste it somewhere temporarily.
- Use
- Select
Clusters
from the sidebar. - Click on
Connect
in the cluster box. - Whitelist your i.p. address.
- Choose a connection method.
- Use the second method: Using MongoDB's native drivers.
In the last pane, there is a code snippet. In that code snippet, there is a uri
. It will look something like this.
const uri =
"mongodb+srv://user31:<password>@cluster0.9oceg.mongodb.net/<dbname>?retryWrites=true&w=majority";
- Create a
.env
file - Add the uri to that file.
MONGO_URI=mongodb+srv://user31:<password>@cluster0.9oceg.mongodb.net/<dbname>?retryWrites=true&w=majority
Replace <password>
and <dbname>
with actual values.
<password>
is the password you assigned to the user you created in the previous step.<dbname>
is the name of the database.
Open this exercise file: exercise-1.1.md
Open this exercise file: exercise-1.2.md
Open this exercise file: exercise-1.3.md
Open this exercise file: exercise-1.4.md
Open this exercise file: exercise-2.1.md
Open this exercise file: exercise-2.2.md
Open this exercise file: exercise-2.3.md
Open this exercise file: exercise-2.4.md
Open this exercise file: exercise-2.5.md
Open this exercise file: exercise-2.6.md
🟡 - Minimally complete workshop (75%) - 🟡