Refactor port constants to Placeholders.kt

Move SERVER_PORT and JDBC_PORT constants from Main.kt to Placeholders.kt to centralize configuration. This change improves maintainability by keeping related constants together in a single file. Additionally, it ensures that any updates to port configurations are managed more easily.
This commit is contained in:
2024-12-01 12:14:43 +01:00
parent 0eb853050b
commit b1f2af5cbb
3 changed files with 4 additions and 3 deletions

View File

@@ -13,9 +13,6 @@ import nl.astraeus.tmpl.web.RequestHandler
val log = Logger()
val SERVER_PORT = 7001
val JDBC_PORT = 8001
fun main() {
Thread.currentThread().uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { t, e ->
log.warn(e) {

View File

@@ -2,6 +2,9 @@ package nl.astraeus.tmpl
val REPO_NAME = "dummy so the gitea template compiles, please remove"
val SERVER_PORT = 7001
val JDBC_PORT = 8001
val pageTitle = "${REPO_NAME}"
val itemUrl = "${REPO_NAME}"
val repoName = "${REPO_NAME}"

View File

@@ -8,6 +8,7 @@ import kotlinx.html.script
import kotlinx.html.stream.appendHTML
import kotlinx.html.title
import nl.astraeus.tmpl.REPO_NAME
import nl.astraeus.tmpl.itemUrl
import nl.astraeus.tmpl.pageTitle
import nl.astraeus.tmpl.repoName