mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-09 07:18:57 +07:00
Improved ports and updated documentation of UncivServer (#7747)
* Improved ports on UncivServer
See 6315a16d98 (r83109934)
for details
* Update UncivServer.kt
* Update Multiplayer.md
* Update Multiplayer.md
This commit is contained in:

committed by
GitHub

parent
81d2320824
commit
7c1b298a24
@ -27,7 +27,7 @@ private class UncivServerRunner : CliktCommand() {
|
||||
"-p", "-port",
|
||||
envvar = "UncivServerPort",
|
||||
help = "Server port"
|
||||
).int().restrictTo(1024..49151).default(80)
|
||||
).int().restrictTo(0..65535).default(8080)
|
||||
|
||||
private val folder by option(
|
||||
"-f", "-folder",
|
||||
@ -40,7 +40,8 @@ private class UncivServerRunner : CliktCommand() {
|
||||
}
|
||||
|
||||
private fun serverRun(serverPort: Int, fileFolderName: String) {
|
||||
echo("Starting UncivServer for ${File(fileFolderName).absolutePath} on port $serverPort")
|
||||
val portStr: String = if (serverPort == 80) "" else ":$serverPort"
|
||||
echo("Starting UncivServer for ${File(fileFolderName).absolutePath} on http://localhost$portStr")
|
||||
embeddedServer(Netty, port = serverPort) {
|
||||
routing {
|
||||
get("/isalive") {
|
||||
|
Reference in New Issue
Block a user