removed user and pass from mongoose options

This commit is contained in:
David Baldwynn 2017-11-21 13:12:34 -08:00
parent 31985ddda7
commit 39125972c3
4 changed files with 6 additions and 7 deletions

2
config/env/all.js vendored
View File

@ -10,8 +10,6 @@ module.exports = {
db: {
uri: process.env.MONGOLAB_URI || process.env.MONGODB_URI || 'mongodb://'+ (process.env.DB_PORT_27017_TCP_ADDR || '127.0.0.1') + '/mean',
options: {
user: '',
pass: '',
useMongoClient: true
}
},

View File

@ -6,8 +6,6 @@ module.exports = {
db: {
uri: process.env.MONGODB_URI || 'mongodb://'+( process.env.DB_PORT_27017_TCP_ADDR || '127.0.0.1') +'/mean',
options: {
user: '',
pass: '',
useMongoClient: true
}
},

2
config/env/test.js vendored
View File

@ -5,8 +5,6 @@ module.exports = {
db: {
uri: 'mongodb://localhost/mean-test',
options: {
user: '',
pass: '',
useMongoClient: true
}
},

View File

@ -11,7 +11,7 @@ var mongoose = require('mongoose'),
* Main application entry file.
* Please note that the order of loading is important.
*/
module.exports.bootstrap = function() {
var bootstrap = module.exports.bootstrap = function() {
//Don't check .env file if we are in travis-ci
if(!process.env.TRAVIS) {
require('dotenv').config({path: './.env'});
@ -82,3 +82,8 @@ module.exports.bootstrap = function() {
process.exit(1);
});
}
// To maintain backwards compatibility, run bootstrap when called as a file
if(require.main === module) {
bootstrap();
}