I’m using repl.it to complete MongoDB and Mongoose - Install and Set Up Mongoose and kept getting this image. I’m pretty sure I followed all the steps correctly but it seems my ip address is wrong??
My mongodb network access is 0.0.0.0/0 (includes your current IP address)
and I’ve set a database + collection as well as the user and password.
.env
MONGO_URI='mongodb+srv://fcc:<mypassword>@cluster0.mg1xb.mongodb.net/fcc_database?retryWrites=true&w=majority'
(my password is here)
app.js
const mongoose = require('mongoose');
mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true, useUnifiedTopology: true });
package.json
{
"name": "fcc-mongo-mongoose-challenges",
"version": "0.0.1",
"description": "A boilerplate project",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"body-parser": "^1.15.2",
"express": "^4.12.4",
"mongoose": "^5.10.5",
"mongodb": "^3.5.9"
},
"engines": {
"node": "4.4.5"
},
"repository": {
"type": "git",
"url": "https://hyperdev.com/#!/project/welcome-project"
},
"keywords": [
"node",
"hyperdev",
"express"
],
"license": "MIT"
}