``` class RethinkDB : Jooby.Module { override ...
# announcements
j
Copy code
class RethinkDB : Jooby.Module {
    override fun configure(env: Env, conf: Config, binder: Binder) {
        val hostname = conf.getString("rethink.hostname")
        val port = conf.getInt("rethink.port")

        binder.bind(Connection::class.java).toProvider(this::provider)
        binder.bind(Connection::class.java).toProvider {
            r.connection().connect()
        }
    }

    fun provider(): Connection {
        return r.connection().connect()
    }
}