mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-10-07 16:30:28 +00:00
add tests and make several replacements/improvements
This commit is contained in:
18
startup/launcher/src/jvmMain/kotlin/Main.kt
Normal file
18
startup/launcher/src/jvmMain/kotlin/Main.kt
Normal file
@@ -0,0 +1,18 @@
|
||||
package dev.inmo.micro_utils.startup.launcher
|
||||
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
import dev.inmo.kslog.common.i
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import java.io.File
|
||||
|
||||
suspend fun main(args: Array<String>) {
|
||||
|
||||
KSLog.default = KSLog("ServerLauncher")
|
||||
val (configPath) = args
|
||||
val file = File(configPath)
|
||||
KSLog.i("Start read config from ${file.absolutePath}")
|
||||
val json = defaultJson.parseToJsonElement(file.readText()).jsonObject
|
||||
KSLog.i("Config has been read")
|
||||
|
||||
start(json)
|
||||
}
|
Reference in New Issue
Block a user