Tell us what’s happening:
Hello, i’m trying to set up mongoDb and mongoose but i cant seems to pass the test, “mongodb” dependency should be in package.json
“mongoose” dependency should be in package.json
“mongoose” should be connected to a database. please what am i doing wrong?
Your code so far
<password>MONGO_URI='mongodb+srv://Adegbite1999:@<dbname>.ne3hq.mongodb.net/Cluster0?retryWrites=true&w=majority'
const mongoose = require('mongoose');
mongoose.connect({ useNewUrlParser: true, useUnifiedTopology: true });
mongoose.connect(process.env.MONGO_URI);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
.
Challenge: Install and Set Up Mongoose
Link to the challenge: