[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: provide port option
From: |
gnunet |
Subject: |
[libeufin] branch master updated: provide port option |
Date: |
Tue, 12 Jan 2021 17:14:50 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new e5aac2a provide port option
e5aac2a is described below
commit e5aac2abb17d71003a491c9c413bfe40ebcc9753
Author: MS <ms@taler.net>
AuthorDate: Tue Jan 12 17:14:33 2021 +0100
provide port option
---
nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt | 4 +++-
nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index fadb819..1d3e78a 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory
import tech.libeufin.nexus.server.serverMain
import tech.libeufin.util.CryptoUtil.hashpw
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
+import com.github.ajalt.clikt.parameters.types.int
import execThrowableOrTerminate
import tech.libeufin.nexus.iso20022.parseCamtMessage
import tech.libeufin.util.DEFAULT_DB_CONNECTION
@@ -55,10 +56,11 @@ class Serve : CliktCommand("Run nexus HTTP server") {
}
private val dbConnString by option().default(DEFAULT_DB_CONNECTION)
private val host by option().default("127.0.0.1")
+ private val port by option().int().default(5001)
private val logLevel by option()
override fun run() {
setLogLevel(logLevel)
- serverMain(dbConnString, host)
+ serverMain(dbConnString, host, port)
}
}
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 84ce00d..bfeee9c 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
@@ -209,14 +209,14 @@ fun requireBankConnection(call: ApplicationCall,
parameterKey: String): NexusBan
return requireBankConnectionInternal(name)
}
-fun serverMain(dbName: String, host: String) {
+fun serverMain(dbName: String, host: String, port: Int) {
execThrowableOrTerminate {
dbCreateTables(dbName)
}
val client = HttpClient {
expectSuccess = false // this way, it does not throw exceptions on !=
200 responses.
}
- val server = embeddedServer(Netty, port = 5001, host = host) {
+ val server = embeddedServer(Netty, port = port, host = host) {
install(CallLogging) {
this.level = Level.DEBUG
this.logger = tech.libeufin.nexus.logger
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: provide port option,
gnunet <=