Connecting to the database

We can connect to the database with Exposed by passing the URL of the database and its driver:

    // Connect to the database    Database.connect("jdbc:h2:mem:test", driver = "org.h2.Driver")

Get Kotlin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.