[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: add config option
From: |
gnunet |
Subject: |
[libeufin] branch master updated: add config option |
Date: |
Fri, 22 Sep 2023 21:46:50 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 0a3ca564 add config option
0a3ca564 is described below
commit 0a3ca564522f63b6686335cdded1f6df0c89dbfe
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Sep 22 16:46:44 2023 -0300
add config option
---
bank/src/main/kotlin/tech/libeufin/bank/Main.kt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/bank/src/main/kotlin/tech/libeufin/bank/Main.kt
b/bank/src/main/kotlin/tech/libeufin/bank/Main.kt
index e6d90efa..61ea1227 100644
--- a/bank/src/main/kotlin/tech/libeufin/bank/Main.kt
+++ b/bank/src/main/kotlin/tech/libeufin/bank/Main.kt
@@ -23,6 +23,7 @@ package tech.libeufin.bank
import TalerConfig
import TalerConfigError
import com.github.ajalt.clikt.core.CliktCommand
+import com.github.ajalt.clikt.parameters.options.*
import com.github.ajalt.clikt.core.context
import com.github.ajalt.clikt.core.subcommands
import com.github.ajalt.clikt.output.CliktHelpFormatter
@@ -409,6 +410,10 @@ fun readBankApplicationContextFromConfig(cfg:
TalerConfig): BankApplicationConte
}
class ServeBank : CliktCommand("Run libeufin-bank HTTP server", name =
"serve") {
+ private val configFile by option(
+ "--config",
+ help = "set the configuration file"
+ )
init {
context {
helpFormatter = CliktHelpFormatter(showDefaultValues = true)
@@ -416,7 +421,7 @@ class ServeBank : CliktCommand("Run libeufin-bank HTTP
server", name = "serve")
}
override fun run() {
- val config = TalerConfig.load()
+ val config = TalerConfig.load(this.configFile)
val ctx = readBankApplicationContextFromConfig(config)
val dbConnStr = config.requireValueString("libeufin-bank-db-postgres",
"config")
logger.info("using database '$dbConnStr'")
--
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: add config option,
gnunet <=