Skip to content

Commit 456392d

Browse files
author
Henrik Malmberg
committed
Don't force port to be specified in mongoURI
http://regexr.com/3cncm
1 parent 51dfc62 commit 456392d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ExportAdapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ExportAdapter.prototype.connect = function() {
3535
}
3636

3737
//http://regexr.com/3cn6m
38-
if (!this.mongoURI.match(/^mongodb:\/\/((.+):(.+)@)?([^:@]+):([^:]+)\/(.+?)$/gm)) {
38+
if (!this.mongoURI.match(/^mongodb:\/\/((.+):(.+)@)?([^:@]+):{0,1}([^:]+)\/(.+?)$/gm)) {
3939
throw new Error("Invalid mongoURI: " + this.mongoURI)
4040
}
4141
var usernameStart = this.mongoURI.indexOf('://') + 3;

0 commit comments

Comments
 (0)