connect to db

This commit is contained in:
Torma Kristóf 2021-08-17 17:23:34 +02:00
parent c6d2b85876
commit df13c145e7
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -1,5 +1,9 @@
import database.DatabaseFactory
import database.dao.ResultObjects
import di.databasemodule import di.databasemodule
import mq.ConsumerWrapper import mq.ConsumerWrapper
import org.jetbrains.exposed.sql.SchemaUtils
import org.jetbrains.exposed.sql.transactions.transaction
import org.koin.core.context.GlobalContext.startKoin import org.koin.core.context.GlobalContext.startKoin
fun main(vararg args: String) { fun main(vararg args: String) {
@ -9,6 +13,11 @@ fun main(vararg args: String) {
modules(databasemodule) modules(databasemodule)
} }
DatabaseFactory.init()
transaction{
SchemaUtils.create(ResultObjects)
}
val consumerWrapper = ConsumerWrapper(); val consumerWrapper = ConsumerWrapper();
consumerWrapper.recieve(); consumerWrapper.recieve();
} }