forked from maiora/backend-api
Compare commits
No commits in common. "5be3bea4d053fb54b0b4e254a29ebc9d09d0a885" and "42b61c24ffc7bd16909728768cfdfc618492a928" have entirely different histories.
5be3bea4d0
...
42b61c24ff
@ -13,15 +13,13 @@ import java.io.FileInputStream
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
val properties = loadConfig()
|
embeddedServer(Netty, port = 8098, host = "0.0.0.0", module = Application::module)
|
||||||
val port = properties.getProperty("server.port").toInt()
|
.start(wait = true)
|
||||||
embeddedServer(Netty, port = port, host = "0.0.0.0") {
|
|
||||||
module(properties)
|
|
||||||
}.start(wait = true)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Application.module(configFile: Properties) {
|
fun Application.module() {
|
||||||
val config = ApplicationConfig("application.conf")
|
val config = ApplicationConfig("application.conf")
|
||||||
|
val configFile = loadConfig()
|
||||||
val dbUrl = configFile.getProperty("ktor.database.url")
|
val dbUrl = configFile.getProperty("ktor.database.url")
|
||||||
val username = configFile.getProperty("ktor.database.username")
|
val username = configFile.getProperty("ktor.database.username")
|
||||||
val password = configFile.getProperty("ktor.database.password")
|
val password = configFile.getProperty("ktor.database.password")
|
||||||
|
Loading…
Reference in New Issue
Block a user