Skip to content

Commit 5d024cd

Browse files
committed
Update mongoose version and updated readme
1 parent c469895 commit 5d024cd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Simple node js api project with jwt authentication with mongodb.
55

66
This is assumed that npm, node and mongodb are installed on the machine.
77

8-
* node js >= 8.x
9-
* npm >= 5.x
10-
* mongodb >= 3.2.x
8+
* node js >= 10.x.x
9+
* npm >= 6.x.x
10+
* mongodb >= 4.2.x
1111

1212
For installing node and npm please refer [here](https://nodejs.org/en/download/package-manager/).
1313
For installing mongodb [here](https://docs.mongodb.com/manual/installation/).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"http-status": "^1.0.1",
4141
"https": "^1.0.0",
4242
"jsonwebtoken": "^8.0.1",
43-
"mongoose": "^5.7.7",
43+
"mongoose": "^5.9.2",
4444
"morgan": "^1.8.2",
4545
"path": "^0.12.7",
4646
"randomstring": "^1.1.5",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const server = require('http').Server(app);
1212

1313
// MongoDB connection configuration
1414
mongoose.Promise = global.Promise;
15-
mongoose.connect(process.env.DB_URL, {useMongoClient: true}, (err, res) => {
15+
mongoose.connect(process.env.DB_URL, {useUnifiedTopology: true, useNewUrlParser: true}, (err, res) => {
1616
if (err)
1717
console.log(`err connecting to db on ${process.env.DB_URL}, err: ${err}`);
1818
else

0 commit comments

Comments
 (0)