Runtime properties renginering

This commit is contained in:
Claude Brisson
2023-11-02 11:05:40 +01:00
parent 8e5450486e
commit 5fdf3e8944
11 changed files with 47 additions and 110 deletions

View File

@@ -117,7 +117,7 @@ private fun getResourceProperty(key: String) = serverProps.getProperty(key)?.let
private fun launchServer() {
// create webapps contexts
val webAppContexts = mutableListOf<WebAppContext>()
val mode = serverProps["mode"] ?: throw Error("missing property: mode")
val mode = serverProps["mode"] ?: "standalone"
if (mode == "server" || mode == "standalone") webAppContexts.add(createContext("api", "/api"))
if (mode == "client" || mode == "standalone") webAppContexts.add(createContext("view", "/"))