connect to db
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2021-08-17 17:22:06 +02:00
parent 1c76eefb1d
commit 4c0d87d1ea
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -1,5 +1,9 @@
import database.DatabaseFactory
import database.dao.SampleObjects
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(SampleObjects)
}
val consumerWrapper = ConsumerWrapper(); val consumerWrapper = ConsumerWrapper();
consumerWrapper.recieve(); consumerWrapper.recieve();
} }