Tell us what’s happening:
I get this:
“mongoose” should be connected to a database
Your code so far
package.json:
{
"name": "fcc-mongo-mongoose-challenges",
"version": "0.0.1",
"description": "A boilerplate project",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.16.4",
"body-parser": "^1.19.0",
"mongodb": "^3.3.2",
"mongoose": "^5.7.4",
"connect-mongo": "^2.0.3"
},
"engines": {
"node": "8.x"
},
"repository": {
"type": "git",
"url": "https://hyperdev.com/#!/project/welcome-project"
},
"keywords": [
"node",
"hyperdev",
"express"
],
"license": "MIT"
}
myApp.js:
var mongodb = require('mongodb');
const mongoose = require('mongoose');
mongoose.connect(process.env.MONGO_URI,{useNewUrlParser: true});
and .env:
SECRET=
MADE_WITH=
MONGO_URI='mongodb+srv://migoda:myPassword@cluster0-ycsin.mongodb.net/test?retryWrites=true&w=majority'
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36
.
Challenge: undefined
Link to the challenge: