Skip to content

Commit

Permalink
added db_options to config objetc
Browse files Browse the repository at this point in the history
  • Loading branch information
ericchaves committed Dec 22, 2012
1 parent 83b174b commit 645717b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/resourceful/engines/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var Mongodb = exports.Mongodb = function Mongodb (config) {

this.db = new Db(config.database || resourceful.env || 'test',
new Server(config.host || config.uri || '127.0.0.1',
config.port || 27017));
config.port || 27017), config.db_options);

this.collection = config.collection || 'resourceful';

Expand Down
3 changes: 2 additions & 1 deletion test/engines/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ engine.options = {
database: 'test',
host: '127.0.0.1',
port: 27017,
collection: 'resourceful'
collection: 'resourceful',
db_options: {safe:true}
};

engine.load = function (resourceful, data, callback) {
Expand Down

0 comments on commit 645717b

Please sign in to comment.