nails-boilerplate 0.10.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  const mongoose = require('mongoose');
2
2
  const mongooseOptions = {useNewUrlParser: true};
3
3
 
4
- module.exports.connect = function(options) {
5
- if (options.uri) mongoose.connect(options.uri, mongooseOptions);
4
+ module.exports.connect = async function(options) {
5
+ if (options.uri) return mongoose.connect(options.uri, mongooseOptions);
6
6
  else {
7
7
  var url = options.url || 'mongodb://localhost';
8
8
  var port = options.port || '27017';
9
9
  var database = options.database || 'nails';
10
- mongoose.connect(`${url}:${port}/${database}`, mongooseOptions);
10
+ return mongoose.connect(`${url}:${port}/${database}`, mongooseOptions);
11
11
  }
12
12
  }
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nails-boilerplate",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "description": "A node.js webserver scaffold",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "express-react-views": "*",
31
31
  "express-ws": "*",
32
32
  "mime": "*",
33
- "mongodb": "^3.5.7",
33
+ "mongodb": "^4.3.1",
34
34
  "mongoose": "*",
35
35
  "react": "*",
36
36
  "react-dom": "^16.13.1",