summaryrefslogtreecommitdiff
path: root/nexus/src/main/kotlin/tech/libeufin/nexus/server
diff options
context:
space:
mode:
authorMS <ms@taler.net>2023-01-18 22:42:57 +0100
committerMS <ms@taler.net>2023-01-18 22:42:57 +0100
commita8413e5315b078a1833beb597de400ad1dbfe2ee (patch)
treeff9f023d60e083387e900bfe981cee794e928a3b /nexus/src/main/kotlin/tech/libeufin/nexus/server
parentbb485263833445d93ae2d5bba71b55bfdc18367a (diff)
downloadlibeufin-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.kt23
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)
- }
-}