Support node 0.4 in mongodb adapter

This commit is contained in:
Anatoliy Chakkaev 2012-03-11 15:28:42 +04:00
parent 8bb855c88c
commit d558dd6b70
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ exports.initialize = function initializeSchema(schema, callback) {
var url = require('url').parse(schema.settings.url);
s.host = url.hostname;
s.port = url.port;
s.database = url.path.replace(/^\//, '');
s.database = url.pathname.replace(/^\//, '');
s.username = url.auth && url.auth.split(':')[0];
s.password = url.auth && url.auth.split(':')[1];
}