Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
updating 0.4.0 merged branch to support the declerative db connection…
Browse files Browse the repository at this point in the history
… object instead of just a connection string
  • Loading branch information
lirantal committed Jul 2, 2015
1 parent 67e96a4 commit b76c2cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion config/env/development.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
'use strict';

module.exports = {
db: 'mongodb://localhost/mean-dev',
db: {
uri: 'mongodb://localhost/mean-test',
options: {
user: '',
pass: ''
}
},
log: {
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
format: 'dev',
Expand Down
2 changes: 1 addition & 1 deletion config/lib/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports.loadModels = function() {
module.exports.connect = function(cb) {
var _this = this;

var db = mongoose.connect(config.db, function (err) {
var db = mongoose.connect(config.db.uri, config.db.options, function (err) {
// Log Error
if (err) {
console.error(chalk.red('Could not connect to MongoDB!'));
Expand Down

0 comments on commit b76c2cd

Please sign in to comment.