diff --git a/server-mongo/src/main/kotlin/com/lightningkite/lightningdb/MongoDatabase.kt b/server-mongo/src/main/kotlin/com/lightningkite/lightningdb/MongoDatabase.kt index acc79bc1..1dcb840a 100644 --- a/server-mongo/src/main/kotlin/com/lightningkite/lightningdb/MongoDatabase.kt +++ b/server-mongo/src/main/kotlin/com/lightningkite/lightningdb/MongoDatabase.kt @@ -84,7 +84,7 @@ class MongoDatabase(val databaseName: String, private val makeClient: () -> Mong ?: throw IllegalStateException("Invalid mongodb URL. The URL should match the pattern: mongodb+srv://[credentials and host information]/[databaseName]?[params]") } DatabaseSettings.register("mongodb-test") { - Regex("""mongodb-test://(?:\?(?.*))?""") + Regex("""mongodb-test(?:://\?(?.*))?""") .matchEntire(it.url) ?.let { match -> val params: Map>? = match.groups["params"]?.value?.let { params ->