diff options
author | MS <ms@taler.net> | 2023-01-18 22:42:57 +0100 |
---|---|---|
committer | MS <ms@taler.net> | 2023-01-18 22:42:57 +0100 |
commit | a8413e5315b078a1833beb597de400ad1dbfe2ee (patch) | |
tree | ff9f023d60e083387e900bfe981cee794e928a3b /nexus/src/main/kotlin/tech/libeufin/nexus/server | |
parent | bb485263833445d93ae2d5bba71b55bfdc18367a (diff) | |
download | libeufin-a8413e5315b078a1833beb597de400ad1dbfe2ee.tar.gz libeufin-a8413e5315b078a1833beb597de400ad1dbfe2ee.tar.bz2 libeufin-a8413e5315b078a1833beb597de400ad1dbfe2ee.zip |
Falling back to IPv4, when IPv6 isn't supported.
Diffstat (limited to 'nexus/src/main/kotlin/tech/libeufin/nexus/server')
-rw-r--r-- | nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt index 1d00fb92..b8c33065 100644 --- a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt +++ b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt @@ -1048,26 +1048,3 @@ val nexusApp: Application.() -> Unit = { } } } -fun serverMain(port: Int, localhostOnly: Boolean, ipv4Only: Boolean) { - val server = embeddedServer( - Netty, - environment = applicationEngineEnvironment { - connector { - this.port = port - this.host = if (localhostOnly) "127.0.0.1" else "0.0.0.0" - } - if (!ipv4Only) connector { - this.port = port - this.host = if (localhostOnly) "[::1]" else "[::]" - } - module(nexusApp) - } - ) - logger.info("LibEuFin Nexus running on port $port") - try { - server.start(wait = true) - } catch (e: BindException) { - logger.error(e.message) - exitProcess(1) - } -} |