From 812f12a69468d5b20fef7afc6cd82c130481e9ad Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Sat, 17 Apr 2021 21:56:08 +0000
Subject: [PATCH] WIP: react app -> Spring boot
---
borgbutler-server/src/main/kotlin/de/micromata/borgbutler/server/BorgButlerApplication.kt | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/borgbutler-server/src/main/kotlin/de/micromata/borgbutler/server/BorgButlerApplication.kt b/borgbutler-server/src/main/kotlin/de/micromata/borgbutler/server/BorgButlerApplication.kt
index 983d9e3..3f5a401 100644
--- a/borgbutler-server/src/main/kotlin/de/micromata/borgbutler/server/BorgButlerApplication.kt
+++ b/borgbutler-server/src/main/kotlin/de/micromata/borgbutler/server/BorgButlerApplication.kt
@@ -46,7 +46,8 @@
// Preread configuration to get setting development mode for WebConfig (logging not yet initialized, so
// reread configuration later after logging is available for getting log information on errors etc.)
val configuration = ConfigurationHandler.readJsonConfigfile(File(borgButlerHome))
- RunningMode.webDevelopment = RunningMode.runningInIDE || (configuration as? ServerConfiguration)?.webDevelopmentMode == true
+ RunningMode.webDevelopment =
+ RunningMode.runningInIDE || (configuration as? ServerConfiguration)?.webDevelopmentMode == true
if (System.getProperty("LOG_PATH").isNullOrBlank()) {
// Needed by logback-spring.xml
System.setProperty("LOG_PATH", borgButlerHome)
@@ -103,7 +104,11 @@
BorgInstallation.getInstance().initialize()
// 0.0.0.0 for Docker installations.
- val url = "http://$serverAddress:$serverPort/".replace("0.0.0.0", "127.0.0.1")
+ var url = "http://$serverAddress:$serverPort/"
+ if (serverAddress.contains("0.0.0.0")) {
+ log.info { "Server bind address: $url" }
+ url = url.replace("0.0.0.0", "127.0.0.1")
+ }
val uri = URI.create(url)
val quietMode = line.hasOption('q')
if (!quietMode && RunningMode.desktopSupportsBrowse && RunningMode.headlessMode) {
@@ -132,6 +137,7 @@
@EventListener(ApplicationReadyEvent::class)
open fun startApp() {
+ log.info { "Start-up of BorgButler finished. Have fun!" }
}
@PreDestroy
--
Gitblit v1.10.0