mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-10-05 07:09:29 +00:00
add tests and make several replacements/improvements
This commit is contained in:
24
startup/launcher/src/commonMain/kotlin/Start.kt
Normal file
24
startup/launcher/src/commonMain/kotlin/Start.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
package dev.inmo.micro_utils.startup.launcher
|
||||
|
||||
import dev.inmo.kslog.common.i
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
import org.koin.core.KoinApplication
|
||||
import org.koin.core.context.GlobalContext
|
||||
import org.koin.dsl.module
|
||||
|
||||
suspend fun start(rawConfig: JsonObject) {
|
||||
with(StartupLauncherPlugin) {
|
||||
logger.i("Start initialization")
|
||||
val koinApp = KoinApplication.init()
|
||||
koinApp.modules(
|
||||
module {
|
||||
setupDI(rawConfig)
|
||||
}
|
||||
)
|
||||
logger.i("Modules loaded")
|
||||
GlobalContext.startKoin(koinApp)
|
||||
logger.i("Koin started")
|
||||
startPlugin(koinApp.koin)
|
||||
logger.i("App has been setup")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user