I followed the solution to the t in replit, but did not pass the specs at all. If anyone can help. Thank you.
test results:
"mongodb" dependency should be in package.json
"mongoose" dependency should be in package.json
"mongoose" should be connected to a database
my reference for setting database in mongodb:
https://forum.freecodecamp.org/t/mongodb-cluster-connection-instructions-very-confusing/417145/6?u=shugyoza
my input in replit, and yes, always stop and run after each change.
.env in replit (secret)
key field: MONGO_URI
value field: "mongodb+srv://userNamePrefilled:passwordIChangedWithPasswordInMongo@cluster0.5lubw.mongodb.net/actualDBNameCreatedInMongoDB?retryWrites=true&w=majority"
package.json
{
"name": "fcc-learn-node-with-express",
"version": "0.1.0",
"dependencies": {
"express": "^4.14.0",
"body-parser": "^1.15.2",
"cookie-parser": "^1.4.3",
"mongodb": "^3.6.0",
"mongoose": "^5.4.0",
"fcc-express-bground": "https://github.com/freeCodeCamp/fcc-express-bground-pkg.git"
},
"main": "server.js",
"scripts": {
"start": "node server.js"
}
}
myApp.js
const mongoose = require('mongoose');
const mongo = process.env['MONGO_URI'];
mongoose.connect(mongo);
Your project link(s)
solution: https://replit.com/@shugyoza/boilerplate-express
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36
Challenge: Install and Set Up Mongoose
Link to the challenge: