commit 26/08/2025

This commit is contained in:
2025-08-26 08:24:31 +07:00
parent 0c84449b77
commit 4743b47a89
16 changed files with 534 additions and 77 deletions

View File

@@ -1,20 +1,31 @@
import audio.AudioPlayer
import com.sun.jna.Platform
import content.ContentCache
import database.MariaDB
import org.tinylog.Logger
import oshi.util.GlobalConfig
import web.WebApp
fun main() {
if (Platform.isWindows()){
// supaya OSHI bisa mendapatkan CPU usage di Windows seperti di Task Manager
GlobalConfig.set(GlobalConfig.OSHI_OS_WINDOWS_CPU_UTILITY,true)
}
Logger.info("Application started" as Any)
val audioPlayer = AudioPlayer(44100) // 44100 Hz sampling rate
audioPlayer.InitAudio(1)
val content = ContentCache()
val db = MariaDB()
val web = WebApp(3030,
listOf(
Pair("admin", "password"),
Pair("user", "password")
)
), db
)
web.Start()
}