createClient

fun createClient(): MongoClient

Creates a MongoClient instance with default connection string (localhost).


fun createClient(connectionString: String): MongoClient
fun createClient(connectionString: ConnectionString): MongoClient

Creates a MongoClient with the given connection string.


fun createClient(settings: MongoClientSettings): MongoClient

Creates a MongoClient with the given settings (the codec registry is updated with KMongo mapping).