Skip to content

Commit 26a60f2

Browse files
committed
Merge pull request #200 from bohemima/master
Don't force port to be specified in mongoURI
2 parents 51dfc62 + 456392d commit 26a60f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ExportAdapter.js

+1-1
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)