MongoDB and Mongoose - Install and Set Up Mongoose

Tell us what’s happening:
Describe your issue in detail here.

Your project link(s)
require(‘dotenv’).config();
console.log(“mongoose”);
const mySecret = process.env[‘MONGO_URI’]
const Database = require(“@replit/database”)
const db = new Database()
db.set(“key”, “value”).then(() => {});
db.get(“key”).then(value => {});
db.delete(“key”).then(() => {});
db.list().then(keys => {});
db.list(“prefix”).then(matches => {});
let Person;

const createAndSavePerson = (done) => {

done(null /, data/);
};

const createManyPeople = (arrayOfPeople, done) => {
done(null /, data/);
};

const findPeopleByName = (personName, done) => {
done(null /, data/);
};

const findOneByFood = (food, done) => {
done(null /, data/);
};

const findPersonById = (personId, done) => {
done(null /, data/);
};

const findEditThenSave = (personId, done) => {
const foodToAdd = “hamburger”;

done(null /, data/);
};

const findAndUpdate = (personName, done) => {
const ageToSet = 20;

done(null /, data/);
};

const removeById = (personId, done) => {
done(null /, data/);
};

const removeManyPeople = (done) => {
const nameToRemove = “Mary”;

done(null /, data/);
};

const queryChain = (done) => {
const foodToSearch = “burrito”;

done(null /, data/);
};

/** Well Done !!
/* You completed these challenges, let’s go celebrate !
*/

//----- DO NOT EDIT BELOW THIS LINE ----------------------------------

exports.PersonModel = Person;
exports.createAndSavePerson = createAndSavePerson;
exports.findPeopleByName = findPeopleByName;
exports.findOneByFood = findOneByFood;
exports.findPersonById = findPersonById;
exports.findEditThenSave = findEditThenSave;
exports.findAndUpdate = findAndUpdate;
exports.createManyPeople = createManyPeople;
exports.removeById = removeById;
exports.removeManyPeople = removeManyPeople;
exports.queryChain = queryChain;

solution: boilerplate-mongomongoose (12) - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54

Challenge: MongoDB and Mongoose - Install and Set Up Mongoose

Link to the challenge:

I tried to connect mongoose but I was not creative enough to install I need some help would sure appreciate it . I also tried the mongo DB Atlas my cluster gone through successfully but I could not connect to the database using the syntax.

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