mirror of
https://github.com/yairm210/Unciv.git
synced 2025-08-03 12:37:42 -04:00
Resolved #9697 - Unciv server creates multiplayer file folder if it doesn't exist
This commit is contained in:
parent
a3df5e3c61
commit
15777b306f
@ -123,7 +123,10 @@ private class UncivServerRunner : CliktCommand() {
|
||||
|
||||
private fun serverRun(serverPort: Int, fileFolderName: String) {
|
||||
val portStr: String = if (serverPort == 80) "" else ":$serverPort"
|
||||
echo("Starting UncivServer for ${File(fileFolderName).absolutePath} on http://localhost$portStr")
|
||||
|
||||
val file = File(fileFolderName)
|
||||
echo("Starting UncivServer for ${file.absolutePath} on http://localhost$portStr")
|
||||
if (!file.exists()) file.mkdirs()
|
||||
val server = embeddedServer(Netty, port = serverPort) {
|
||||
routing {
|
||||
get("/isalive") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user