Create and Set up Mangoose

Tell us what’s happening:
I successfully created the atlas database and tried connecting to the database using replit.
I created a secret environment variable instead of .env file and added the code below in my app.js file;

const mongoose = require(‘mongoose’);

mongoose.connect(process.env.MONGO_URI);

Assuming my atlas db password is 12345, I used the following link for my environment variable

mongodb+srv://khalifabako:12345@cluster0.barre.mongodb.net/Cluster0?retryWrites=true&w=majority

I had doubts if the link above is in the correct form.

Despite all of these I still get an unsatisfied requirement that mangoose should be connected to a database.

Your project link(s)

solution: https://replit.com/@sdahirsalman/boilerplate-mongomongoose-1

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:94.0) Gecko/20100101 Firefox/94.0

Challenge: Install and Set Up Mongoose

Link to the challenge:

Update: I did nothing and it now passed. Thanks in advance!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.