generated from rnentjes/kotlin-server-web-empty
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:
@@ -13,9 +13,6 @@ import nl.astraeus.tmpl.web.RequestHandler
|
|||||||
|
|
||||||
val log = Logger()
|
val log = Logger()
|
||||||
|
|
||||||
val SERVER_PORT = 7001
|
|
||||||
val JDBC_PORT = 8001
|
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
Thread.currentThread().uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { t, e ->
|
Thread.currentThread().uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { t, e ->
|
||||||
log.warn(e) {
|
log.warn(e) {
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ package nl.astraeus.tmpl
|
|||||||
|
|
||||||
val REPO_NAME = "dummy so the gitea template compiles, please remove"
|
val REPO_NAME = "dummy so the gitea template compiles, please remove"
|
||||||
|
|
||||||
|
val SERVER_PORT = 7001
|
||||||
|
val JDBC_PORT = 8001
|
||||||
|
|
||||||
val pageTitle = "${REPO_NAME}"
|
val pageTitle = "${REPO_NAME}"
|
||||||
val itemUrl = "${REPO_NAME}"
|
val itemUrl = "${REPO_NAME}"
|
||||||
val repoName = "${REPO_NAME}"
|
val repoName = "${REPO_NAME}"
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import kotlinx.html.script
|
|||||||
import kotlinx.html.stream.appendHTML
|
import kotlinx.html.stream.appendHTML
|
||||||
import kotlinx.html.title
|
import kotlinx.html.title
|
||||||
import nl.astraeus.tmpl.REPO_NAME
|
import nl.astraeus.tmpl.REPO_NAME
|
||||||
|
import nl.astraeus.tmpl.itemUrl
|
||||||
import nl.astraeus.tmpl.pageTitle
|
import nl.astraeus.tmpl.pageTitle
|
||||||
import nl.astraeus.tmpl.repoName
|
import nl.astraeus.tmpl.repoName
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user