generated from rnentjes/kotlin-server-web-empty
Refactor placeholder constants into dedicated file
Moved REPO_NAME and related constants into Placeholders.kt to improve code organization and maintainability. The code now dynamically references these constants where needed, simplifying updates and ensuring consistency across modules. Updated relevant imports and references to accommodate these changes.
This commit is contained in:
@@ -13,8 +13,6 @@ import nl.astraeus.tmpl.web.RequestHandler
|
||||
|
||||
val log = Logger()
|
||||
|
||||
val REPO_NAME = "dummy so the gitea template compiles, please remove"
|
||||
|
||||
val SERVER_PORT = 7001
|
||||
val JDBC_PORT = 8001
|
||||
|
||||
@@ -37,7 +35,7 @@ fun main() {
|
||||
Class.forName("nl.astraeus.jdbc.Driver")
|
||||
Database.initialize(HikariConfig().apply {
|
||||
driverClassName = "nl.astraeus.jdbc.Driver"
|
||||
jdbcUrl = "jdbc:stat:webServerPort=$JDBC_PORT:jdbc:sqlite:data/${REPO_NAME}.db"
|
||||
jdbcUrl = "jdbc:stat:webServerPort=$JDBC_PORT:jdbc:sqlite:data/$repoName.db"
|
||||
username = "sa"
|
||||
password = ""
|
||||
maximumPoolSize = 25
|
||||
|
||||
Reference in New Issue
Block a user