2MongoDB and Mongoose - Install and Set Up Mongoose need HELP!

2MongoDB and Mongoose - Install and Set Up Mongoose need HELP!
0
#1

Hi Team,

I cannot establish connection to database.
My code:
.env file

myApp.js
var mongodb = require(‘mongodb’);
const mongoose = require(‘mongoose’);
mongoose.connect(process.env.MONGO_URI,{useNewUrlParser: 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”: {
“express”: “^4.16.4”,
“body-parser”: “^1.18.3”,
“mongoose”: “^5.4.19”,
“mongodb”: “^3.1.17”
},
“engines”: {
“node”: “4.4.5”
},
“repository”: {
“type”: “git”,
“url”: "
},
“keywords”: [
“node”,
“hyperdev”,
“express”
],
“license”: “MIT”
}
Please help!!!

0 Likes

split this topic #2

9 posts were merged into an existing topic: MongoDB and Mongoose - Install and Set Up Mongoose

0 Likes

closed #3
0 Likes