fixing clients
new frontend
This commit is contained in:
@@ -5,7 +5,7 @@ import kotlinx.browser.document
|
|||||||
|
|
||||||
@OptIn(ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
fun main() {
|
fun main() {
|
||||||
ComposeViewport(document.body!!) {
|
ComposeViewport(document.getElementById("ComposeTarget")!!) {
|
||||||
App()
|
App()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<link type="text/css" rel="stylesheet" href="styles.css">
|
<link type="text/css" rel="stylesheet" href="styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!--<div id="ComposeTarget"></div>-->
|
<div id="ComposeTarget"></div>
|
||||||
<!--<script src="skiko.js"></script>-->
|
<!--<script src="skiko.js"></script>-->
|
||||||
<!--<script src="Meldestelle-client.js"></script>-->
|
<!--<script src="Meldestelle-client.js"></script>-->
|
||||||
<script src="web-app.js"></script>
|
<script src="web-app.js"></script>
|
||||||
|
|||||||
@@ -63,5 +63,10 @@ kotlin {
|
|||||||
implementation(libs.ktor.client.cio)
|
implementation(libs.ktor.client.cio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
val jsMain by getting {
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.ktor.client.js)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ import io.ktor.serialization.kotlinx.json.*
|
|||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
|
|
||||||
class PingApiClient(
|
class PingApiClient(
|
||||||
private val baseUrl: String = "http://localhost:8080"
|
private val baseUrl: String = "http://localhost:8081"
|
||||||
) : PingApi {
|
) : PingApi {
|
||||||
|
|
||||||
private val client = HttpClient {
|
private val client = HttpClient {
|
||||||
|
|||||||
+4
-1
@@ -17,7 +17,10 @@ class PingServiceApplication {
|
|||||||
override fun addCorsMappings(registry: CorsRegistry) {
|
override fun addCorsMappings(registry: CorsRegistry) {
|
||||||
registry.addMapping("/**")
|
registry.addMapping("/**")
|
||||||
.allowedOriginPatterns("http://localhost:*")
|
.allowedOriginPatterns("http://localhost:*")
|
||||||
.allowedOrigins("http://localhost:8080", "http://localhost:8083", "http://localhost:4000")
|
.allowedOrigins("http://localhost:8080",
|
||||||
|
"http://localhost:8083",
|
||||||
|
"http://localhost:4000"
|
||||||
|
)
|
||||||
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
||||||
.allowedHeaders("*")
|
.allowedHeaders("*")
|
||||||
.allowCredentials(true)
|
.allowCredentials(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user