From df13c145e7debad21b6fa11ef590bfe84420bf92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Tue, 17 Aug 2021 17:23:34 +0200 Subject: [PATCH] connect to db --- src/main/kotlin/Main.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt index 5d36e59..f546339 100644 --- a/src/main/kotlin/Main.kt +++ b/src/main/kotlin/Main.kt @@ -1,5 +1,9 @@ +import database.DatabaseFactory +import database.dao.ResultObjects import di.databasemodule import mq.ConsumerWrapper +import org.jetbrains.exposed.sql.SchemaUtils +import org.jetbrains.exposed.sql.transactions.transaction import org.koin.core.context.GlobalContext.startKoin fun main(vararg args: String) { @@ -9,6 +13,11 @@ fun main(vararg args: String) { modules(databasemodule) } + DatabaseFactory.init() + transaction{ + SchemaUtils.create(ResultObjects) + } + val consumerWrapper = ConsumerWrapper(); consumerWrapper.recieve(); } \ No newline at end of file