Skip to content

Commit

Permalink
support for mongodb url (fixes #51) - thanks mschuetz, apologies for …
Browse files Browse the repository at this point in the history
…not using your exact pull request
  • Loading branch information
Marcello Bastea-Forte committed Sep 10, 2011
1 parent 33431bd commit fd3e673
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var safetyNet = require('./util').safetyNet,

// [mongo://][username:password@]hostname[:port][/databasename]

var UrlMatcher = /^(?:mongo:\/\/)?(?:([^:]+):([^@]+)@)?(.+?)(?::([0-9]+))?(?:\/(.*))?$/
var UrlMatcher = /^(?:mongo(?:db)?:\/\/)?(?:([^:]+):([^@]+)@)?(.+?)(?::([0-9]+))?(?:\/(.*))?$/

function parseUrl(url) {
var match = UrlMatcher.exec(url)
Expand Down

0 comments on commit fd3e673

Please sign in to comment.