Support node 0.4 in mongodb adapter
This commit is contained in:
parent
8bb855c88c
commit
d558dd6b70
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue